H3 Motion Context Chain
Chain past MiniMax H3's 15-second limit without touching the Run button
MiniMax H3 makes gorgeous four-to-fifteen-second clips with the soundtrack baked in, and then it stops. If you want a scene that runs longer - a conversation, a walk through a house, a full minute of anything - you chain clips: pin the tail of clip A, then generate clip B so it keeps the same motion and the same audio going instead of starting a new take. The ComfyUI-H3-Motion-Context pack is how you do that join without the picture round-tripping out to pixels and back, which is where seams and colour drift came from in the older approaches.
H3 Motion Context does that heavy lifting. This node, H3 Motion Context Chain, is the remote control - a row of buttons that runs the chain for you. It exists because driving a chain by hand is exactly the fiddly thing that goes wrong.
Why you can't just press Run
A chain is carried by two helper nodes, H3 Motion Context Save Latent and Load Latent, which move the previous clip across runs through numbered files (clip_00001.safetensors and so on). Their clip_index widgets mean: Load is the clip you're continuing from, Save is the clip this run is. First clip is Load 0 / Save 1; making clip 2 from clip 1 is Load 1 / Save 2. Between every clip you bump both numbers and queue again.
Do that with ComfyUI's Run button and you're in trouble: each index change is a separate graph edit, so two widgets incrementing can queue two runs and skip a slot. The README is blunt - don't use queue "run on change" to walk a chain. The Chain node makes advancing Load/Save and queuing one prompt a single atomic action.
How it works
Fun detail: the Python side does nothing. Its execute is a no-op, it's flagged as an output node, and it has no outputs. The real work lives in the node's frontend JS, which draws the buttons, finds the Load and Save nodes in its canvas group, bumps their clip_index widgets, and queues exactly one prompt - waiting for it to finish before touching the numbers again. It's a browser-side stage manager, not a graph operation; nothing to wire.
The one input you get, segments (INT, default 0), is how many clips Chain runs before stopping on its own; 0 means keep going until you click Stop. The buttons:
- Run/Re-roll - queues at the current Load/Save indices without advancing. This is your Run button. Hate clip 2? Click again; the retry overwrites that slot.
- Approve - advances both indices, then runs the next clip once.
- Chain - Approve on a loop, clipping along 0/1 → 1/2 → 2/3 until
segmentsis spent. Exception: at Load 0 / Save 1 with no clip 1 on disk, it generates that first clip first, then keeps going. - Reset - back to Load 0 / Save 1. Doesn't queue, doesn't delete files.
- Clear latents - deletes the numbered chain slots in the Load folder. Files you renamed yourself are left alone.
Installing it
ComfyUI Manager (search "ComfyUI-H3-Motion-Context"), or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/NikoDemon80/ComfyUI-H3-Motion-Context
Then restart ComfyUI. The pack needs ComfyUI 0.34.0 or newer - the release where H3 gained arbitrary keyframe anchors - and on anything older the nodes refuse to run and point you at pack version 0.3.1. No model downloads or extra pip dependencies; it's Python plus a small web folder. You still need MiniMax H3 itself working in ComfyUI first (roughly 42 GB of weights), and the H3 community licence excludes the US, EU, UK and Korea, so check it before shipping anything built on this.
The gotchas that bite
The big one is right in the node's description: Load, Save, and Chain must all sit in the same canvas group - one of those coloured boxes you draw around nodes. If they don't, every button silently does nothing and the node tells you exactly that. Select all three and Group Selected.
Two more from the README worth knowing before you're an hour in:
- Don't mute the Load node on the first clip. Load 0 reads no file - it just passes the conditioning through and reports
trim_frames0, so it's meant to stay enabled the whole chain. - An old workflow saved against an earlier version of the pack loads widget numbers into the wrong slots (ComfyUI stores them by position). Delete the node, add it again, rewire it. And only install the pack once: a fork, a manual clone next to a Manager install, or a renamed backup in
custom_nodeswill all load and fight each other.
One expectation to set: quality degrades down a long chain, audio first - it gets duller even when timing stays locked. This node makes chaining reliable, not infinite; keep a critical ear on long sequences.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| segments | INT | 00–9999 | How many clips Chain generates before it stops. 0 keeps going until you click Stop. |
Outputs (0)
No outputs