The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Open models: Inpaint shows no size choice for Qwen-Image 2.1 before a prompt is typed
Adarshf7de7a4f6f39
diff --git a/src/lib/composer.ts b/src/lib/composer.tsindex 746fb029..455e4b77 100644--- a/src/lib/composer.ts+++ b/src/lib/composer.ts@@ -75,8 +75,10 @@ export function settingsShape(const single = op ? SINGLE_TAKE.has(op) : studioOps.length > 0 && studioOps.every((x) => SINGLE_TAKE.has(x));// The operation, or the studio's only one before anything is attached (Video tools → Depth map).const is = (x: Operation) => op === x || (!op && studioOps.length > 0 && studioOps.every((y) => y === x));- // A graph that takes no size (ModelRoute.unsized: Qwen-Image 2.1's edit follows image 1) has none to pick for this operation.- const routes = op ? (model?.routes ?? []).filter((r) => r.op === op) : [];+ // A graph that takes no size (ModelRoute.unsized: Qwen-Image 2.1's edit follows image 1) has none to pick for this+ // operation, or for any of the studio's while the operation isn't known yet (Inpaint before a prompt).+ const ops = op ? [op] : studioOps;+ const routes = (model?.routes ?? []).filter((r) => ops.includes(r.op));const sized = !routes.length || routes.some((r) => !r.unsized);return {aspect: !sized || op === "i2v" || op === "flf2v" ? null : many(o.aspectRatios),diff --git a/tests/open-sota-studios.test.ts b/tests/open-sota-studios.test.tsindex 23a1e03c..de25be68 100644--- a/tests/open-sota-studios.test.ts+++ b/tests/open-sota-studios.test.ts@@ -212,6 +212,9 @@ describe("what the composer offers for Qwen-Image 2.1's and FIBO 2's edits", ()expect([shape.aspect, shape.resolution], op).toEqual([null, null]);}expect(settingsShape(q, "t2i", "image", true)).toMatchObject({ aspect: q.options.aspectRatios, resolution: ["1K", "1.5K", "2K"] });+ // Before the operation is known (Inpaint with no prompt yet): the studio's operations decide.+ expect(settingsShape(q, undefined, "image", true, {}, INPAINT_STUDIO.ops)).toMatchObject({ aspect: null, resolution: null });+ expect(settingsShape(q, undefined, "image", true, {}, IMAGE_STUDIO.ops).aspect).toEqual(q.options.aspectRatios);expect(settingsShape(getModel("oss-fibo2-dev")!, "edit", "image", true).aspect).toBeNull();// Krea 2 Edit's graph takes a size: its chips stay.expect(settingsShape(getModel("oss-krea2-edit")!, "edit", "image", true).aspect).toContain("auto");