Skip to content

Why multiple video workflows for reference counts

Benjiyaya edited this page Aug 23, 2026 · 1 revision

Why multiple video workflows for different reference counts

ComfyUI graphs are fixed. A LoadImage node is always there. There is no CLI-style “1 to 9 images, optional.” Empty is still a connected input: Comfy either uses the image baked into the API JSON or the node fails.

That is why Calliope ships one imported workflow per reference count (2-ref, 4-ref, 5-ref, …) instead of one universal video graph.

See also ComfyUI HTTP API vs MCP and the README workflow section.

What Calliope can fill

Calliope never rewrites the graph to add or remove LoadImage nodes. It only writes paths into slots that already exist.

Generic (Input:image) slots are filled in node-id order:

  1. Characters on the scene, in scene order, if they have a sheet (or portrait)
  2. Then the location / environment image
  3. Stop at the slot count

That order is also <Subject N> in MiniMax H3 prompts. Subject 1 is the lowest-node-id ref image.

Scene Needs A 2-slot graph A 5-slot graph
1 character + location 2 images Fits Extra slots keep the JSON defaults
4 characters + location 5 images First two subjects only; the rest are dropped Fits

Generate all does not count characters and swap graphs. Per scene it uses: the dropdown on that scene → else the stored workflow_id → else the first enabled video workflow. First/Next motion only swaps the motion pair, not the slot count.

So if you keep separate 2-ref / 4-ref / 5-ref imports, assign the matching workflow on each scene before Generate all.

Why leftover slots are a problem

Unused slots are not “optional off.” Calliope does not clear them. They keep whatever filename was in the imported API JSON — often an example PNG. H3 still sees those pictures.

A larger graph is only safe for a smaller scene if those extra LoadImage widgets are truly empty or the custom node ignores them.

How to author today

  1. In ComfyUI, build one API Format workflow per ref count you care about.
  2. Tag each ref LoadImage (Input:image) (Ref 1, Ref 2, …), prompt (Input:prompt), duration (Input:duration), output (Output:video).
  3. Import and enable them in Settings → Workflows.
  4. On Video, pick the 2-ref / 4-ref / 5-ref graph on each scene (or leave only one family enabled if every scene fits).
  5. Generate all then queues from saved script + asset sheets. It does not use the per-scene form’s typed prompt or manual ref pickers.

Later: one dynamic image-picker node

The long-term fix is a custom ComfyUI node that accepts 1 to 9 images, where missing slots are absent — not leftover defaults. Then Calliope can use one video workflow and one input shape.

That node should:

  • Own an ordered list (or image_1image_9 widgets that may be unset)
  • Treat empty as unused so Comfy does not read a baked-in example PNG
  • Survive Save (API Format) so Calliope can upload files and write filenames

Calliope would then tag a single node, e.g. Refs (Input:images), and smart-fill the scene’s character sheets + location (capped at 9) onto that list. Generate all would no longer need a per-scene 2-ref vs 5-ref pick. First/Next motion context would stay a separate pair if you still chain long clips.

Until that node exists, multiple imported graphs is the honest workaround. We will not pretend nine optional LoadImage nodes are a dynamic CLI.