H3 Auto Chain + Stitch
The node that turns a pile of H3 clips into one long video (and queues the next clip for you)
- video
- chain_config
- audio
- current video
- single clip
- combined video
This is the payoff node of the H3 Auto-Chain pack, the one that makes the whole contraption worth setting up. MiniMax H3 only renders 4–15 second clips natively, which is useless if you want a two-minute music video or a character talking for an entire scene. H3 Auto Chain + Stitch is what you hang off the end of the workflow: it saves each clip you generate, queues the next one without you touching a single number, and - when the audio finally runs out - stitches every clip into one continuous MP4. The name is a lie in one direction only: the "stitch" part is real, and it works.
What it actually does
Each time the workflow runs, this node takes the current clip's VIDEO, re-encodes it with ffmpeg (via imageio-ffmpeg) so it lands at exactly the chain's frame count and fps, and writes it to output/video/<chain>_clip_001.mp4. Then it grabs the clip's final frame as a _last.png - that's the file the Frame Reference node uses on the next clip. If there's still source audio left, it patches the clip numbers inside the running graph's Load Latent and Save Latent nodes and queues clip 2 automatically. When the last clip is done, it muxes every existing clip into output/video/<chain>.mp4. One queue click, N renders, one final video. That auto-requeue is the load-bearing trick: the graph never changes, the node just bumps the clip index and re-queues itself.
The inputs that matter
Three of the four required inputs are things you mostly set once and forget:
chain_config- theH3_CHAINoutput fromH3 Auto Chain Audio. This is the node's brain feed; it carries the chain ID, clip timing, and latent slot numbers. No chain_config, no chain.audio_source-original audio inputreplaces each clip's audio with the frame-aligned source audio during the final stitch. That's the recommended setting when the finished video must match your source timeline exactly, and it's why you connect thesource_audiooutput fromH3 Auto Chain Audiointo this node's optionalaudioinput.generated video audiojust keeps whatever audio each clip already carries - simpler, but seams can drift.delete_completed_latents- off by default, and leave it that way until the chain is finished. It wipes the chain'sh3_context/*.safetensorsfiles after a successful stitch; keeping them means you can retry or extend the chain later.
Note the trap in audio_source: pick original audio input and forget to wire the audio input, and the node raises an error rather than silently producing a video with no sound. That's the correct behaviour, but it surprises people.
Common issues
- The final video only contains some clips. That's expected when the chain is sparse - the stitch includes every matching clip MP4 that exists and skips the missing numbers. Render the gaps with the same
chain_idand stitch again. - "Connect the matching Auto Chain Audio node." You've got a chain_config from a different node or a stale chain. Make sure
H3 Auto Chain Audiois the only chain-audio node in the graph and thechain_idmatches everywhere. - Auto-requeue silently stops. The requeue needs exactly one
Load Latentand oneSave Latentnode in the graph; if either is missing it raises instead of limping on.
Installing it
The pack installs like any ComfyUI custom node: via Manager (search "H3 Motion Context"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Ltamann/ComfyUI-H3-Motion-Context-Auto-Chain-addon
Restart ComfyUI. There's no requirements.txt - the dependencies (imageio-ffmpeg, numpy, Pillow, safetensors) are declared in pyproject.toml and you almost certainly already have them from your H3 workflow. What you don't get for free is the model: this pack assumes a working MiniMax H3 workflow, which is its own heavy lift - a ~42GB 33B model, and remember the H3 Community License geofences the open weights out of the US, EU, UK and South Korea. Don't run it alongside other H3 patch packs that rewrite the same ComfyUI internals; the addon coexists fine with the original H3 Motion Context package, but only one patch wins.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | — | |
| chain_config | H3_CHAIN | Connect the chain_config output from H3 Auto Chain Audio. This supplies the chain ID, clip timing, and latent slots. | |
| audio_source | COMBO | original audio input | Original audio input replaces the audio in the generated clips at frame-aligned boundaries. Generated video audio keeps the audio already embedded in each generated video clip. |
| save_mode | COMBO | save each clip separately + composite final video | Individual clip files are always saved. Choose whether to also save the final composite, partial composites, or no composite video. |
| delete_completed_latents | BOOLEAN | false | Delete this chain's saved H3 latent files after the final MP4 is stitched successfully. Disable to keep them available for retry or resume. |
| audioopt | AUDIO | The complete original audio. When connected, the final MP4 uses this source at frame-aligned clip boundaries instead of reusing per-clip encoded audio. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| current video | VIDEO | — |
| single clip | VIDEO | — |
| combined video | VIDEO | — |