H3 Auto Chain Motion Context
How the next clip remembers what the last one did
- conditioning
- vae
- latent
- chain_config
- context_frames
- context_latent
- audio_vae
- context_audio
- conditioning
- trim_frames
This is the node that stops an H3 chain from looking like a slideshow of unrelated clips. It carries the previous clip's picture - and optionally its sound - across the seam into the next render, so motion, voice, and scene all continue instead of resetting. In chain terms it's the continuity node, and it's the reason the whole pack exists: H3 clips are short, and without motion context every new clip starts from nothing.
The pack ships its own standalone implementation of H3 Motion Context here, so you don't need the original Motion Context package installed to use it. It's the MiniMaxH3AutoChain-era replacement for the stock node in auto-chain workflows.
How it works
The trick is that context_latent is the previous clip's sampler output - the same latent you'd wire into the decode nodes. The node slices the picture (and audio) straight out of that latent and pins it ahead of the new clip's own generation, skipping the decode-then-re-encode cycle that costs a little quality at every link in a chain. If no context_latent is wired, it falls back to context_frames (decoded frames of the previous clip) plus an optional context_audio / audio_vae pair to carry the tail sound - same idea, slightly lossier path. And on clip 1, when there's no previous clip at all, the node passes the conditioning straight through and reports trim_frames as 0. That pass-through is deliberate: an automatic chain has nothing to pin yet.
The inputs that matter
context_length- frames of the previous clip's picture to carry over, offered as an enum because only whole numbers of latent steps are valid:22,5,39,56. The tooltip says it best: 5 is "just barely fluid", 22 is "nearly seamless", and 56 spends 2.3 seconds of the render on frames you throw away. Longer windows pin more motion but come off the front of the delivered clip. Start at 22.audio_context_length- frames of tail audio to pin, independent of the picture window. 24 pins the last second; 0 follows the video window. Multiples of 24 are whole seconds; off-grid values get widened to the nearest step.latent- the current clip's own sampler latent, needed to build the conditioning.context_latent- feed this from the addon'sLoad Latentnode. Must be the same resolution as the clip being generated; a mismatch is a hard error, so keep every clip in a chain at the same resolution (start a newchain_idif you change it).
conditioning and vae are the standard conditioning/VAE pair from your H3 workflow - wire them in like any conditioning node.
Outputs
Two, and the second is easy to miss: conditioning goes into your H3 text-conditioning path, and trim_frames is the number of pinned frames the delivered clip starts with - wire it into H3 Auto Chain Motion Context Trim so the picture and sound get their leading frames cut before you stitch. Ignore trim_frames and every clip is a full context-length longer than its timeline slot, so the chain drifts.
Gotchas
- Don't decode the context latent. The saved latent is H3's paired video/audio representation, only valid into this node's
context_latentinput. Wiring it into a VAE decode breaks. - Missing previous latent? The chain still renders - the node logs a warning and falls back to zero context - but the clip will be visually disconnected from the one before it. The load node never reuses a latent from another chain, which is a safety feature and occasionally confusing.
- Keep one chain per workflow. Same
chain_ideverywhere, one chain-audio node, or continuity silently goes sideways.
Install is the pack install: Manager → search "H3 Motion Context", or git clone https://github.com/Ltamann/ComfyUI-H3-Motion-Context-Auto-Chain-addon into ComfyUI/custom_nodes/, restart. No extra model downloads - it operates on the H3 workflow you already have. If the original H3 Motion Context package is installed too, both can coexist; the addon just doesn't register its node IDs. Don't stack multiple H3 patch packs on top of each other, though - only the first compatible patch stays active.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| vae | VAE | — | |
| latent | LATENT | — | |
| chain_config | H3_CHAIN | Auto Split configuration. Its context-frame count sets the pinned video and audio context spans and the matching trim. | |
| context_framesopt | IMAGE | Decoded frames of the previous clip. Used when no context_latent is wired. When one is, the picture comes from it instead and this is ignored. | |
| context_latentopt | LATENT | Previous clip's SAMPLER OUTPUT latent (the same one you wire into the decode nodes). Supplies both picture and sound, sliced straight out, skipping the decode and re-encode that cost a little quality at every link of a chain. Must be the same resolution as the clip being generated. | |
| audio_vaeopt | VAE | H3 audio VAE. Supply with context_audio to carry the previous clip's tail sound across the join. Not needed when context_latent is wired. | |
| context_audioopt | AUDIO | Audio of the previous clip. The tail matching the pinned frames is encoded and pinned alongside them. Ignored when context_latent is wired. | |
| endless_continuationopt | BOOLEAN | false | Append the previous clip's synchronized video/audio tail as an H3 continuation reference, like HR Endless Sampler. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| trim_frames | INT | — |