From 06dff2abc6896bc8b762eeaa36bd2d7cb37802ab Mon Sep 17 00:00:00 2001 From: 524110636 <524110636@qq.com> Date: Sun, 7 Jun 2026 14:55:31 +0800 Subject: [PATCH 1/5] Backup before GPT image fix --- main.py | 3 ++- static/angle.html | 18 +++++++++--------- static/api-settings.html | 14 +++++++------- static/asset-manager.html | 10 +++++----- static/canvas.html | 16 ++++++++-------- static/comfyui-settings.html | 14 +++++++------- static/enhance.html | 16 ++++++++-------- static/gpt-chat.html | 12 ++++++------ static/index.html | 28 ++++++++++++++-------------- static/klein.html | 16 ++++++++-------- static/online.html | 16 ++++++++-------- static/smart-canvas.html | 10 +++++----- static/zimage.html | 14 +++++++------- 13 files changed, 94 insertions(+), 93 deletions(-) diff --git a/main.py b/main.py index bab28b8c7..773482779 100644 --- a/main.py +++ b/main.py @@ -6750,13 +6750,14 @@ async def post_openai_edits(edit_files=None): edit_failed_status = None edit_failed_text = "" try: + image_field_name = "image[]" if is_gpt2 and len(image_refs) > 1 else "image" for ref in image_refs[:4]: path = output_file_from_url(ref.get("url", "")) if not path: continue fh = open(path, "rb") opened.append(fh) - files.append(("image", (os.path.basename(path), fh, content_type_for_path(path)))) + files.append((image_field_name, (os.path.basename(path), fh, content_type_for_path(path)))) if mask_refs: mask_path = output_file_from_url(mask_refs[0].get("url", "")) if mask_path: diff --git a/static/angle.html b/static/angle.html index 2bc342c72..c412e53a0 100644 --- a/static/angle.html +++ b/static/angle.html @@ -17,21 +17,21 @@ } catch(e) {} })(); - - - - - - + + + + + + - +
diff --git a/static/api-settings.html b/static/api-settings.html index a3071ae0f..3e49f66c2 100644 --- a/static/api-settings.html +++ b/static/api-settings.html @@ -15,12 +15,12 @@ } catch(e) {} })(); - - - - - - + + + + + +