Neo H3 Add Context (Cross-segment)
Stitch Long H3 Videos Without the Visible Seam
- model
- conditioning
- vae
- context_image
- identity_image
- model
- conditioning
MiniMax H3 caps out at 4–15 second clips. You want a minute, so you chain segments - and immediately hit the two classic problems: the boundary frame shows up twice, and the second clip drifts, because a fresh image-to-video pass only knows one still frame of context. Neo H3 Add Context (Cross-segment) fixes both by handing the next segment a real video of where the last one ended, not a frozen frame.
What it's actually doing
Last-frame-to-first-frame chaining is the usual long-video trick: take the final frame of clip 1 and use it as the i2v start of clip 2. People have pushed that to 30-second runs, but motion doesn't carry across the cut and quality stacks down the chain. This node takes a different route. Instead of anchoring one frame, it encodes the tail of the previous segment as an H3 reference video block and appends it to the next segment's conditioning, which then regenerates those frames with the previous segment's real pixels in view - you throw the regenerated head away when you concatenate. No duplicated boundary frame, and the new clip opens on real motion. The pack's own H3 Video Director uses this node for exactly that.
How the mechanism works
You feed it an already-encoded H3 conditioning (the output of a core MiniMaxH3*ToVideo node), the MODEL, and the H3 video VAE. From there:
context_imagegets sliced to its lastcontext_framesframes, encoded by the VAE, and appended as a video reference. The append is additive - it stacks on top of whatever refs the H3 node already wrote rather than replacing them.context_framesis snapped to H3's17k+5frame grid - the model's latent-time geometry, where every 17 frames is 5 latent steps and the first step holds a single frame. 22 stays 22, 30 becomes 22, 39 stays 39; anything at or below 5 becomes 5.identity_imageworks differently: each image in the batch becomes its own image reference block, area-scaled against the canvas and 32-pixel aligned like official reference-to-video images. Four images in, four blocks out - that's how you carry a face across segments without training a LoRA. The window carries no audio; dropped frames get matched by trimming audio samples at concat time instead.
The model output isn't the model you passed in - it's a clone with a continuity wrapper installed, because core does two unhelpful things here: when keyframe anchors and references coexist, core overwrites the keyframe latents with the reference latents, and the layout starts anchor and reference rows' time coordinates at the text length while the target video's origin sits after all references. The wrapper merges the latent lists back into one and copies the window rows onto the target video's opening rows. Skip it and your window is offset by a whole window. With nothing to inject, the node hands back your model and conditioning untouched.
The inputs worth caring about
Everything under required is genuinely required: model, conditioning, vae, width, height. width and height (1344×768) are not your output resolution - they're the reference canvas the identity images get matched against, rounded to 32. Set either to 0 and each image keeps its own dimensions instead.
Of the optional trio, context_frames (default 22) is the one to tune - it's how much of the previous segment gets replayed. Bump it if seams still pop, drop it toward 5 to save tokens. context_image is the tail frames of the prior segment; identity_image is your character sheet, batched.
Outputs are model and conditioning, and you must wire both: model to the sampler's model input, conditioning to positive and negative. Wire the conditioning alone and you've thrown away the wrapper, which is exactly how anchors silently disappear.
Installing
ComfyUI Manager → search Neo Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/neoneo-ai/ComfyUI-Neo-Nodes.git ComfyUI-Neo-Nodes
Restart ComfyUI. Deps come from the shipped requirements.txt - openai, Pillow, PyYAML, pypinyin (the README says requests instead of openai; the file is what actually installs). Skip llama_cpp_python unless you want the pack's local-LLM nodes.
The pack ships no weights. You need the H3 UNet, a CLIP loader set to minimax, an H3 video VAE and a separate H3 audio VAE - the audio VAE can't reuse the video one. And before you spend the evening downloading 40 GB: the H3 Community License excludes the US, EU, UK and South Korea, so the local weights aren't licensed for you there.
Where people get burned
The node isn't in the list at all. The pack wraps this module's import in a try/except and prints [NeoNodes] h3_video_director 节点注册失败(多段视频导演不可用). That means your ComfyUI predates the core MiniMax H3 nodes - not that the install failed.
"上下文窗口 ... 与 H3 的 17k+5 网格不符". The encoded window's latent length didn't match the grid formula, so the node refuses rather than emit garbage. Usually you pointed vae at something that isn't the H3 video VAE - commonly the audio VAE.
A stutter every segment. You're concatenating without dropping the first context_frames frames. Trimming frames is half of it - cut the matching audio samples too, or your sound drifts out of sync one seam at a time.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| conditioning | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 13440–16384 | — |
| height | INT | 7680–16384 | — |
| context_imageopt | IMAGE | — | |
| identity_imageopt | IMAGE | — | |
| context_framesopt | INT | 220–362 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| conditioning | CONDITIONING | — |