-
-
Notifications
You must be signed in to change notification settings - Fork 24
Why multiple video workflows for 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.
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:
- Characters on the scene, in scene order, if they have a sheet (or portrait)
- Then the location / environment image
- 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.
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.
- In ComfyUI, build one API Format workflow per ref count you care about.
- Tag each ref
LoadImage(Input:image)(Ref 1, Ref 2, …), prompt(Input:prompt), duration(Input:duration), output(Output:video). - Import and enable them in Settings → Workflows.
- On Video, pick the 2-ref / 4-ref / 5-ref graph on each scene (or leave only one family enabled if every scene fits).
- Generate all then queues from saved script + asset sheets. It does not use the per-scene form’s typed prompt or manual ref pickers.
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_1…image_9widgets 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.