Nodes/ComfyUI-MiniMax-H3-LongMedia/MiniMax H3 • Long Media Next Segment
ComfyUI Node

MiniMax H3 • Long Media Next Segment

Handing H3 the previous clip so the next one matches

By vizart-vj·Created 14 days ago·Updated 2 days ago· 71
MiniMax H3 • Long Media Next Segment
  • long_media_plan
  • previous_av
  • continuation_av
  • report
segment_index1
video_context_denoise0.00
audio_context_denoise0.00

Long video from H3 isn't generated in one giant pass - it's a chain of segments, where each new segment opens with the tail of the previous one so the motion, lighting and characters carry across the boundary. This node is the part that builds each segment's starting latent: it takes the previous result, freezes its overlap, and fills in the source media that comes after it. It's the "Next Segment" in the pack's internal LongMedia executor, the thing that makes a 15-second clip look like one shot instead of three clips glued together.

What it does

Inputs:

  • long_media_plan - the plan built by Long Media Setup (it holds the timeline geometry, source media, and workflow mode).
  • previous_av - the AV latent from the last finished segment.
  • segment_index - which segment you're preparing. The plan computes the exact frame window.
  • video_context_denoise and audio_context_denoise (both default 0) - how much the inherited overlap gets re-denoised. 0 preserves the previous segment's output exactly, which is the safe default; 1 fully regenerates it. If you crank video_denoise, you lose the continuity you were trying to get.

Outputs are continuation_av (the prepared starting latent, with the overlap frozen in and a noise mask marking what's protected) and a report string with the timeline math - context start frame, visible start, overlap frames, whether the overlap is frozen or zero-filled.

How the overlap trick works

H3's frame grid means clips snap to 17×k+5 frames, and the pack's continuation uses a 22-frame overlap as hidden context. This node lays down the previous segment's last ~22 frames as the new segment's opening, marks them with a denoise mask so the sampler preserves them, and then fills the rest of the window from the plan's source video/audio (when working from a source clip). In multiclip mode there's a newer path where continuity is owned by native H3 motion context rather than latent copying - the node reports which policy it took, so the console tells you whether you got the fresh-head path or the legacy frozen-overlap path.

Why you'd use it

You normally wouldn't - in the standard workflow the Long Media Sampler drives all of this internally, expanding the plan into sequential passes and stitching them itself. This node is for when you're building the segment chain by hand (the manual continuation route: Prepare Continuation / Next Segment → sample → Stitch Continuation), which is the A/B-testing and diagnostics path. If you're hand-rolling a chain, this is how you make segment N+1 inherit segment N's look instead of starting from blank noise and drifting.

Install

Part of ComfyUI-MiniMax-H3-LongMedia. Manager search "MiniMax-H3-LongMedia", or:

cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia

restart, with the H3 weights (checkpoint + VAEs) from MiniMaxAI/MiniMax-H3. Weights are ~42.5 GB and the community license excludes the US, EU, UK and Korea.

Troubleshooting

If the console logs a "zero_fill" overlap policy when you expected a frozen overlap, the mode is using a native motion-context head instead of latent copying - that's by design in multiclip, not an error. If continuity visibly breaks, the usual culprit is video_context_denoise > 0 eating the inherited overlap; drop it back to 0. And if the report's frame math looks wrong, remember everything snaps to the 17×k+5 H3 grid - durations like "5 seconds" come out as 4.97s.

CategoryMiniMax H3/LongMedia/LongMedia

Inputs (5)

NameTypeDefaultDescription
long_media_planLONG_MEDIA_PLAN
previous_avLATENT
segment_indexINT11–100
video_context_denoiseFLOAT0.000–10 preserves the inherited overlap exactly; 1 fully denoises it.
audio_context_denoiseFLOAT0.000–1

Outputs (2)

NameTypeDescription
continuation_avLATENT
reportSTRING