按 OpenAI 官方放开 GIF+参考图,SVG 仍仅文生图;有蒙版禁用 GIF/SVG

This commit is contained in:
Jony
2026-11-09 11:41:31 +08:00
parent 81a0e50b2d
commit 7d6e7fa5d8
12 changed files with 190 additions and 31 deletions
+4 -2
View File
@@ -210,8 +210,10 @@ def validate_gpt_image_vector_output(
fmt = resolve_gpt_image_output_format(model, output_format)
if fmt not in GPT_IMAGE_26_EXTRA_OUTPUT_FORMAT_OPTIONS:
return
if has_images or has_mask:
raise ValueError("SVG / GIF 仅支持纯文生图,不能带参考图或蒙版")
if fmt == "svg" and (has_images or has_mask):
raise ValueError("SVG 仅支持纯文生图,不能带参考图或蒙版")
if fmt == "gif" and has_mask:
raise ValueError("GIF 输出不支持蒙版")
def is_gpt_image_model(model: str) -> bool: