按 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
+14 -5
View File
@@ -119,7 +119,7 @@ const GPT_OUTPUT_FORMATS = [
];
const GPT_26_EXTRA_OUTPUT_FORMATS = [
{ value: "svg", label: "SVG", description: "矢量,仅纯文生图" },
{ value: "gif", label: "GIF", description: "动图,仅纯文生图" },
{ value: "gif", label: "GIF", description: "动图,可带参考图引导动画" },
];
const SEEDREAM_RESOLUTIONS = ["智能", "1K", "2K"];
const SEEDREAM_LAYER_RESOLUTIONS = ["智能", "1K", "1.5K", "2K"];
@@ -1537,11 +1537,20 @@ function syncGptOutputOptions(node) {
formats = SEEDREAM_OUTPUT_FORMATS;
} else {
const is26 = /^gpt-image-2\.6-/.test(String(model || ""));
const hasRefs = (node._o1igReferences || []).length > 0
|| (node._o1igModelReferences || []).length > 0
|| Boolean(node._o1igMask);
const hasImages = (node._o1igReferences || []).length > 0
|| (node._o1igModelReferences || []).length > 0;
const hasMask = Boolean(node._o1igMask);
formats = [...GPT_OUTPUT_FORMATS];
if (is26 && !hasRefs) formats = [...formats, ...GPT_26_EXTRA_OUTPUT_FORMATS];
if (is26) {
if (!hasImages && !hasMask) {
formats = [...formats, ...GPT_26_EXTRA_OUTPUT_FORMATS];
} else if (hasImages && !hasMask) {
formats = [
...formats,
...GPT_26_EXTRA_OUTPUT_FORMATS.filter((option) => option.value === "gif"),
];
}
}
if (node._o1igBackground.value === "transparent") {
formats = formats.filter((option) => option.value !== "jpeg" && option.value !== "svg" && option.value !== "gif");
}