沐阳 H3 · 时间轴尾部桥接(内部)
How a cut gets the motion on the far side of it
- conditioning
- vae
- latent
- context_frames
- context_audio
- audio_vae
- conditioning
- trim_tail_frames
- masked_latent
Here's the problem this node solves. You've got a rough-cut timeline, you've set an in and an out point, and there's already footage sitting on the timeline after your out point. You want the generated clip to land in the gap and hand off cleanly to that footage. So the obvious move is to take the frames just past O and stick them on the end of your generation, right?
You can't. Those frames are already in your edit, and duplicating them into the render creates a visible stutter and a jump backwards at the seam. So instead the node renders a hidden tail window: the post-O motion gets pinned as conditioning at the end of a segment that's a bit longer than what you asked for, and you cut that window off after sampling. What lands in the timeline is your selection - already in motion that matches what follows it.
The mechanism
You feed it context_frames - the decoded picture window from beyond the out point - and it VAE-encodes the last context_length frames of it at the target latent's pixel dimensions. H3's video VAE is temporally compressed, so one encoded token covers a repeating five-frame phase, and the node splits the encoded result into one block per latent step with the right per-step offsets.
Those blocks get appended to your conditioning as minimax_keyframes at absolute frame positions of start_frame + offset, plus a minimax_frame_count in case you also have keyframes pinned elsewhere. anchor_start_frame is where the window begins: 0 means "flush to the end of the target", and the Director passes the frame where the visible range ends. Everything from there to the end of the latent is the hidden tail, and the node returns its length as trim_tail_frames.
The context_length values are the pack's four legal context windows, and the frame counts are exact, not approximate:
5- 2 temporal blocks, ~0.2s. Fast, weak constraint, experimental.22- 7 blocks, about 0.92s. The default, and the recommended starting point.39- 12 blocks. Stronger motion and composition continuity.56- 17 blocks. The longest window, with the highest token and trimming cost.
Two things to know about the outputs. trim_tail_frames should go into the pack's H3AnchorTrim node on its tail_trim_frames input - that's what chops the hidden window and trims the audio to match. And masked_latent is the target latent with the tail blocks seeded as zero-noise, which only happens when your anchor start frame lands on H3's recurring temporal phase. When it doesn't, the node logs 任意帧条件锚点(尾 latent 不硬写入) and hands your latent back untouched, keeping the conditioning anchors only. That's on purpose: for a precise I/O boundary that's off-phase, a hard latent write damages frames you can see, so the pack refuses to do it and loses nothing visible.
If you connect context_audio, you must also connect audio_vae - the node pins the waveform to end exactly at the anchor on H3's 40Hz audio grid. That's the difference between a bridge that feels cut and one that doesn't.
Where it goes wrong
The error messages here are unusually clear, so read them instead of guessing:
需要 22 帧上下文,实际只有 8 帧- your motion window doesn't have enough decoded frames. Shortencontext_length, or move the out point.尾部锚点占用 22 帧,目标段只有 17 帧/尾部 MotionContext 起点 X 不能在 Y 帧目标中容纳 Z 帧- the segment you're sampling is shorter than the anchor plus the visible range. Generate more frames.尾部 context_audio 已连接,但没有连接 audio_vae- as advertised.- An encoding error about the VAE is usually the wrong VAE. H3 uses a video VAE and an audio VAE as separate files; the video one goes into
vae.
Keep resolution constant between segments when you're using temporal latents, and change one thing at a time - the pack's advice is to baseline two segments at 22 frames and compare another length against it on the same inputs. It's doing the job the "infinity"/chaining wrappers do for other video models, with one difference that matters: the audio is pinned onto the same coordinates as the picture, which is the part video chaining usually fumbles.
Install
It ships inside the pack, under the 沐阳 H3 category, in a 内部 folder - normally the Director or the long-video expansion wires it for you. If you're wiring it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang.git
Restart, hard-refresh. No pip extras - but the pack calls ComfyUI's official H3 interfaces, so you need a recent ComfyUI build plus your own H3 weights, Qwen text encoder and both VAEs. And don't run two H3 continuity implementations in one graph: if ComfyUI-H3-Motion-Context is also sitting in custom_nodes, pick one and restart ComfyUI before you switch graphs.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| vae | VAE | — | |
| latent | LATENT | — | |
| context_frames | IMAGE | — | |
| context_length | COMBO | 22 | 4 options: 22, 5, 39, 56 |
| anchor_start_frame | INT | 00–8192 | 0=紧贴目标尾部;导演台会传入生成可见区间结束帧 |
| context_audioopt | AUDIO | — | |
| audio_vaeopt | VAE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| trim_tail_frames | INT | — |
| masked_latent | LATENT | — |