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
Catalog: open models say what they need before a job exists
Claudeab50dc94f807
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 193e199c..aec13b0f 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -684,7 +684,7 @@ const open: ModelDef[] = [tagline: "Pulls the element you name (“the guitar”) onto its own layer · 24 GB GPU, 41 GB download · Apache-2.0",badges: ["new"],routes: [comfy("layers", "layers-qwen-image-layered-control", "prompt = the element to separate")],- options: { seed: true },+ options: { seed: true, requires: { prompt: true, msg: "Name the element to pull out, e.g. “the guitar”" } },}),// Moodboards: generate in the look of reference images (op t2i with the references attached)o({@@ -696,7 +696,7 @@ const open: ModelDef[] = [tagline: "A new image in the look of your moodboard (1–2 collages): palette, light, grain, mood · 24 GB GPU · Apache-2.0",badges: ["new", "top", "fast"],routes: [comfy("t2i", "style-ref-qwen-edit-2511", "Qwen-Image-Edit-2511 + Lightning, 4 steps")],- options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true },+ options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true, requires: { images: 1, msg: "Add 1–2 moodboard images to take the style from" } },defaults: { aspectRatio: "1:1", resolution: "1K" },}),o({@@ -708,7 +708,7 @@ const open: ModelDef[] = [tagline: "Fast style transfer from up to 4 references, 4 steps · 10 GB GPU · Apache-2.0",badges: ["new", "fast"],routes: [comfy("t2i", "style-ref-flux2-klein-4b")],- options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 4, seed: true },+ options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 4, seed: true, requires: { images: 1, msg: "Add 1–4 style reference images" } },defaults: { aspectRatio: "1:1", resolution: "1K" },}),o({@@ -720,7 +720,7 @@ const open: ModelDef[] = [tagline: "Trained for style reference (1–2 images) · 20 GB GPU · Krea 2 Community License: enterprise terms above its size limits",badges: ["new"],routes: [comfy("t2i", "style-ref-krea2", "Krea 2 Turbo + style_reference LoRA")],- options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true },+ options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true, requires: { images: 1, msg: "Add 1–2 moodboard images to take the style from" } },defaults: { aspectRatio: "1:1", resolution: "1K" },}),o({@@ -731,7 +731,7 @@ const open: ModelDef[] = [kind: "image",tagline: "Style-only reference on FLUX.1 [dev] · 20 GB GPU · non-commercial base model",routes: [comfy("t2i", "style-ref-uso-flux1")],- options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true },+ options: { aspectRatios: IMG_AR, resolutions: ["1K", "1.5K"], maxImages: 2, seed: true, requires: { images: 1, msg: "Add 1–2 moodboard images to take the style from" } },defaults: { aspectRatio: "1:1", resolution: "1K" },}),// Soul HEX: the palette in the prompt + a ColorTransfer lock to a swatch rendered from params.palette@@ -896,7 +896,7 @@ const open: ModelDef[] = [vendor: "ComfyUI",family: "utility",kind: "video",- tagline: "Burns timed captions into the frames, keeping the sound · CPU or GPU, no model",+ tagline: "Burns timed captions into the frames chunk by chunk, keeping the sound — any length in steady memory · CPU or GPU, no model",badges: ["new"],routes: [comfy("captions", "captions-burnin", "prompt = timed lines (“0.00-2.40: Hello”) or SRT, e.g. from Qwen3-ASR")],options: {@@ -916,7 +916,7 @@ const open: ModelDef[] = [vendor: "OpenAI × yuvraj108c",family: "whisper",kind: "video",- tagline: "Transcribes and burns word-by-word captions in one job · 6 GB GPU · node pack is non-commercial",+ tagline: "Transcribes and burns word-by-word captions in one job, short clips (whole clip in RAM) · 6 GB GPU · non-commercial node pack, installed only with NC_PACKS=1",routes: [comfy("captions", "captions-whisper-burnin", "Whisper large-v3-turbo + ComfyUI-Whisper (CC-BY-NC-SA code)")],options: { sliders: [{ param: "fontSize", label: "Text size (px)", min: 30, max: 160, step: 5, default: 90 }] },}),@@ -948,11 +948,11 @@ const open: ModelDef[] = [vendor: "MeiGen",family: "infinitetalk",kind: "video",- tagline: "Re-syncs the lips (and head) of real footage to a new voice; camera and background stay · 24 GB GPU · Apache-2.0",+ tagline: "Re-syncs the lips (and head) of real footage to a new voice, up to 40 s per job; camera and background stay · 24 GB GPU · Apache-2.0",badges: ["new"],- routes: [comfy("lipsync", "lipsync-v2v-infinitetalk", "video-to-video, 4 steps from step 2")],- options: { aspectRatios: VID_AR, resolutions: ["480p", "720p"], seed: true, negativePrompt: true },- defaults: { aspectRatio: "16:9", resolution: "480p" },+ routes: [comfy("lipsync", "lipsync-v2v-infinitetalk", "video-to-video, 4 steps from step 2; keeps the source's shape")],+ options: { aspectRatios: ["auto", ...VID_AR], resolutions: ["480p", "720p"], seed: true, negativePrompt: true },+ defaults: { aspectRatio: "auto", resolution: "480p" },}),o({id: "oss-latentsync",@@ -971,7 +971,7 @@ const open: ModelDef[] = [vendor: "ComfyUI",family: "utility",kind: "video",- tagline: "Puts a new soundtrack on a video, optionally mixed over a background track · CPU",+ tagline: "Puts a new soundtrack on a video, optionally mixed over a background track; the picture is copied untouched · CPU",routes: [comfy("mux", "video-mux-audio", "one track: video-mux-audio-replace; two: voice + background mix")],options: { sliders: [{ param: "backgroundVolumeDb", label: "Background level (dB)", min: -30, max: 6, step: 1, default: 0 }] },}),@@ -1003,10 +1003,10 @@ const open: ModelDef[] = [vendor: "Black Forest Labs × xocialize",family: "flux",kind: "image",- tagline: "Dresses the person in image 1 in the top (image 2) and bottom (image 3) · 10 GB GPU · Apache-2.0",+ tagline: "Dresses the person in image 1 in the garment in image 2 (a top, dress or outfit) and an optional bottom in image 3 · 10 GB GPU · Apache-2.0",badges: ["new", "fast"],routes: [comfy("edit", "tryon-flux2-klein-4b", "try-on LoRA; old outfit masked out first")],- options: { maxImages: 3, seed: true },+ options: { maxImages: 3, seed: true, requires: { images: 2, msg: "Add a photo of the person, then the garment" } },}),// Cinema Studio grid and Soul Cast (used by those studios)o({diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex fbdb8556..876ce6a3 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -182,6 +182,9 @@ export function planGeneration(throw new Error(op === "tts" ? "Pick or record the voice to speak with" : "Pick or record the voice to change into");}if (op === "dub" && !req.inputs?.video && !req.inputs?.audio) throw new Error("Add the video to translate");+ const requires = model.options.requires;+ if (requires?.images && (req.inputs?.images?.length ?? 0) < requires.images) throw new Error(requires.msg);+ if (requires?.prompt && !prompt) throw new Error(requires.msg);if (!prompt && !PROMPTLESS.has(op)) {throw new Error("Write a prompt first");}@@ -198,7 +201,7 @@ export function planGeneration(return { model, op, prompt, params: { ...params, numOutputs: perJobOutputs }, loras, jobs, perJobOutputs };}-const NEEDS: Partial<Record<Operation, { images?: number; video?: boolean; videos?: number; audio?: boolean; endImage?: boolean; mask?: boolean; msg: string }>> = {+const NEEDS: Partial<Record<Operation, { images?: number; video?: boolean; videos?: number; audio?: boolean; endImage?: boolean; mask?: boolean; media?: boolean; msg: string }>> = {edit: { images: 1, msg: "Add an image to edit" },inpaint: { images: 1, mask: true, msg: "Add an image and paint the area to change" },outpaint: { images: 1, msg: "Add an image to extend" },@@ -230,6 +233,9 @@ const NEEDS: Partial<Record<Operation, { images?: number; video?: boolean; videocaptions: { video: true, msg: "Add the video to caption" },layers: { images: 1, msg: "Add the image to split into layers" },"image-to-3d": { images: 1, msg: "Add a product or object photo" },+ // media: a video or an audio track (speech tools read a video's soundtrack)+ transcribe: { media: true, msg: "Add the video or audio to transcribe" },+ "separate-audio": { media: true, msg: "Add the video or audio to separate" },};/** Human message for the first missing input of an operation, or null. */@@ -243,6 +249,7 @@ export function missingInputs(op: Operation, req: Pick<GenerationRequest, "inputif (n.audio && !i.audio) return n.msg;if (n.endImage && !i.endImage) return n.msg;if (n.mask && !i.mask) return n.msg;+ if (n.media && !i.video && !i.audio) return n.msg;return null;}diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex b29cf871..eafe5f54 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -286,6 +286,12 @@ export interface ModelOptions {sliders?: { param: string; label: string; min: number; max: number; step: number; default: number }[];/** Extra enum settings sent as-is (Cinema Studio's genre, lens, light, grade, camera move…). */controls?: { param: string; label: string; values: (string | number)[]; default?: string | number }[];+ /**+ * What this model needs beyond its operation's own inputs, checked before a job is created (the+ * composer shows `msg` inline): reference images for a style-reference t2i model, a prompt for a+ * model whose operation is otherwise promptless.+ */+ requires?: { images?: number; prompt?: boolean; msg: string };}export interface Pricing {diff --git a/tests/open-engine.test.ts b/tests/open-engine.test.tsindex f54baa82..884db98a 100644--- a/tests/open-engine.test.ts+++ b/tests/open-engine.test.ts@@ -138,6 +138,44 @@ describe("round-3 open models", () => {expect(() => planGeneration({ feature: "captions", modelId: "oss-captions-burnin" }, getModel, getPreset)).toThrow(/video to caption/);});+ it("asks for a model's own inputs before a job exists (style references, a named element, media to transcribe)", () => {+ const plan = (r: Record<string, unknown>) => () => planGeneration({ feature: "image", ...r } as Parameters<typeof planGeneration>[0], getModel, getPreset);+ for (const id of ["oss-style-qwen-edit", "oss-style-flux2-klein", "oss-style-krea2", "oss-style-uso"]) {+ expect(plan({ modelId: id, prompt: "a lighthouse at dawn" }), id).toThrow(/style reference|moodboard/);+ expect(plan({ modelId: id, prompt: "a lighthouse at dawn", inputs: { images: ["/board.png"] } })().op).toBe("t2i");+ }+ expect(plan({ modelId: "oss-qwen-layered-control", inputs: { images: ["/a.png"] } })).toThrow("Name the element to pull out, e.g. “the guitar”");+ expect(plan({ modelId: "oss-qwen-layered-control", prompt: "the guitar", inputs: { images: ["/a.png"] } })().op).toBe("layers");+ expect(plan({ modelId: "oss-qwen-layered", inputs: { images: ["/a.png"] } })().op).toBe("layers"); // the plain split needs no prompt+ expect(plan({ modelId: "oss-qwen3-asr" })).toThrow("Add the video or audio to transcribe");+ expect(plan({ modelId: "oss-qwen3-asr", inputs: { audio: "/a.wav" } })().op).toBe("transcribe");+ expect(plan({ modelId: "oss-voice-separate" })).toThrow("Add the video or audio to separate");+ expect(plan({ modelId: "oss-voice-separate", inputs: { video: "/v.mp4" } })().op).toBe("separate-audio");+ expect(plan({ modelId: "oss-tryon-klein", prompt: "x", inputs: { images: ["/me.png"] } })).toThrow("Add a photo of the person, then the garment");+ });++ it("every open slider and control shows the value the workflow runs with when it is left alone", () => {+ // Sliders and controls send params.extra only after a change, so their default must be the workflow's own.+ const bound = (wid: string, key: string) => {+ const t = workflowById.get(wid)?.bindings[key]?.[0];+ if (!t) return undefined;+ const graph = JSON.parse(fs.readFileSync(path.join(process.cwd(), "workflows/comfyui", workflowById.get(wid)!.file), "utf8"));+ return graph[t.node]?.inputs[t.input];+ };+ const off: string[] = [];+ for (const m of MODELS.filter((x) => x.engine === "open")) {+ for (const r of m.routes.filter((x) => x.provider === "comfyui" && !x.endpoint.includes("{n}"))) {+ const wf = workflowById.get(r.endpoint);+ for (const c of [...(m.options.sliders ?? []), ...(m.options.controls ?? [])]) {+ if (PROVIDER_PARAMS.has(c.param) || c.default === undefined || !wf?.bindings[c.param]) continue;+ const runs = wf.defaults[c.param] ?? bound(r.endpoint, c.param);+ if (runs !== undefined && String(runs) !== String(c.default)) off.push(`${m.id} ${c.param}: shows ${c.default}, runs ${runs}`);+ }+ }+ }+ expect(off).toEqual([]);+ });+it("runs Virtual Try-On on the try-on LoRA on the open engine", () => {const p = getPreset("app-virtual-try-on")!;expect(p.open).toMatchObject({ modelId: "oss-tryon-klein", op: "edit" });diff --git a/tests/pipeline.test.ts b/tests/pipeline.test.tsindex ee62fb15..fd4dc4b5 100644--- a/tests/pipeline.test.ts+++ b/tests/pipeline.test.ts@@ -67,7 +67,7 @@ describe("createPipeline validation", () => {setSetting("falKey", "fal-test-key");try {// The fixtures run on fal (now "connected"); the LLM has nothing to run on.- expect(() => createPipeline([step("words", "test-transcribe"), { ...step("es", "text-llm", { op: "translate", params: { targetLanguage: "Spanish" } }), after: "words", chain: [{ slot: "prompt" }] }])).toThrow(+ expect(() => createPipeline([step("words", "test-transcribe", { inputs: { audio: "/api/files/uploads/voice.wav" } }), { ...step("es", "text-llm", { op: "translate", params: { targetLanguage: "Spanish" } }), after: "words", chain: [{ slot: "prompt" }] }])).toThrow(/Step “es” would run as a demo \(Claude needs Claude or Ollama\)/,);expect(() => assertOneMode([{ label: "Joining clips", modelId: "join-clips", op: "concat" }, { label: "Writing", modelId: "text-llm", op: "write" }])).toThrow(/Writing needs Claude or Ollama/);