按 OpenAI 官方放开 GIF+参考图,SVG 仍仅文生图;有蒙版禁用 GIF/SVG
This commit is contained in:
@@ -163,3 +163,32 @@ for (const nodeType of ["O1keyGPTImage", "O1keyGPTImageBatch"]) {
|
||||
assert.equal(format.options.values.includes(nodeType === "O1keyGPTImageBatch" ? "GIF" : "gif"), false);
|
||||
assert.equal(frameCount.hidden, true);
|
||||
}
|
||||
|
||||
for (const nodeType of ["O1keyGPTImage", "O1keyGPTImageBatch"]) {
|
||||
const node = makeNode("gpt-image-2.6-sunburst", "最高", nodeType);
|
||||
const size = () => [150, 20];
|
||||
const complexity = { name: "复杂度", value: "中", options: {}, computeSize: size };
|
||||
const formatName = nodeType === "O1keyGPTImageBatch" ? "图片输出格式" : "输出格式";
|
||||
const gifValue = nodeType === "O1keyGPTImageBatch" ? "GIF" : "gif";
|
||||
const svgValue = nodeType === "O1keyGPTImageBatch" ? "SVG" : "svg";
|
||||
const format = {
|
||||
name: formatName,
|
||||
value: nodeType === "O1keyGPTImageBatch" ? "PNG" : "png",
|
||||
options: { values: [] },
|
||||
callback() {},
|
||||
};
|
||||
const frameCount = { name: "帧数", value: 9, options: {}, computeSize: size };
|
||||
const frameDuration = { name: "帧时长ms", value: 200, options: {}, computeSize: size };
|
||||
node.widgets.push(complexity, format, frameCount, frameDuration);
|
||||
extension.nodeCreated(node);
|
||||
|
||||
node.widgets.push({ name: "参考图1", value: "ref.png", options: {} });
|
||||
node.modelWidget.callback();
|
||||
assert.equal(format.options.values.includes(gifValue), true, "refs keep gif");
|
||||
assert.equal(format.options.values.includes(svgValue), false, "refs hide svg");
|
||||
|
||||
node.widgets.push({ name: "遮罩", value: "mask.png", options: {} });
|
||||
node.modelWidget.callback();
|
||||
assert.equal(format.options.values.includes(gifValue), false, "mask hides gif");
|
||||
assert.equal(format.options.values.includes(svgValue), false, "mask hides svg");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user