From dfcd4fcc565c0b7017e74eeb9e6afe30064b79c1 Mon Sep 17 00:00:00 2001 From: 24024 <240241002@qq.com> Date: Fri, 24 Apr 2026 23:20:28 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(api):=20=E5=B0=86=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=B0=BA=E5=AF=B8=E4=BB=8E2160x3840=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BA2048x2048?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改blueprints/api.py中的默认size参数从2160x3840改为2048x2048 - 更新static/js/main.js中GPT_IMAGE_EDIT_MODEL对应的默认尺寸值 - 调整templates/mobile.html中移动端页面的默认尺寸配置 ``` --- blueprints/api.py | 2 +- static/js/main.js | 2 +- templates/mobile.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/api.py b/blueprints/api.py index 205b1de..f810614 100644 --- a/blueprints/api.py +++ b/blueprints/api.py @@ -98,7 +98,7 @@ def generate(): "prompt": prompt, "model": model_value, "images": [{"image_url": img} for img in image_data], - "size": data.get("size") or "2160x3840", + "size": data.get("size") or "2048x2048", "quality": "high", "output_format": "png", } diff --git a/static/js/main.js b/static/js/main.js index 60fb028..5b577d2 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -484,7 +484,7 @@ function updateSizeOptions() { fillSelect('sizeSelect', nextSizes); if (selectedModel === GPT_IMAGE_EDIT_MODEL) { - sizeSelect.value = '2160x3840'; + sizeSelect.value = '2048x2048'; } else if (nextSizes.some(item => item.value === previousValue)) { sizeSelect.value = previousValue; } diff --git a/templates/mobile.html b/templates/mobile.html index 84b548e..88b2870 100644 --- a/templates/mobile.html +++ b/templates/mobile.html @@ -475,7 +475,7 @@ const nextSizes = selectedModel === GPT_IMAGE_EDIT_MODEL ? GPT_IMAGE_EDIT_SIZES : defaultSizeOptions; fillSelect('sizeSelect', nextSizes); if (selectedModel === GPT_IMAGE_EDIT_MODEL) { - sizeSelect.value = '2160x3840'; + sizeSelect.value = '2048x2048'; } else if (nextSizes.some(item => item.value === previousValue)) { sizeSelect.value = previousValue; }