Nodes/ComfyUI-DaSiWa-Nodes/MiniMaxH3 Continuity • Segment Prepare
ComfyUI Node

MiniMaxH3 Continuity • Segment Prepare

Stop Re-Decoding Your H3 Video Every Time You Extend It

By darksidewalker·Created 7 months ago·Updated 3 days ago· 223
MiniMaxH3 Continuity • Segment Prepare
  • sampled
  • context
  • render_latent
  • segment_context
  • ticket

Extending a MiniMax H3 clip is cheap to sample and expensive to decode. Every continuation adds a few seconds of new latent, but the standard wiring hands the whole cumulative timeline downstream, so your VAE re-decodes, your upscaler re-upscales and your exporter re-encodes everything you've already watched - again, and again, and again. MiniMaxH3 Continuity • Segment Prepare exists to cut that bill. It takes the sampler's output and turns it into "just the new section, plus the little bit of source tail the decoder needs."

It's the first of a two-node pair. Prepare handles the latent side and the bookkeeping; Segment Decode turns the result into pixels and audio. You need both, and you need the Director's Advanced panel set to Output → New segment only.

How it works

Two inputs: sampled (your sampler's H3 latent, at source resolution) and context (the continuity_context from the Director Guide). Three outputs: render_latent, segment_context, and ticket.

The clever bit is what happens first. If the Director's output mode isn't segment, this node simply calls Append & Stage's commit path and hands back the cumulative latent. So Full timeline and New segment only run through the same post-sampler wiring and you switch behaviour with a Director setting instead of rewiring your graph. That's a rare piece of good taste in this ecosystem and it's worth leaning on - build the segment graph once, keep it.

In segment mode, and only then, it does the real work. It loads the pinned source checkpoint from output/df_h3_continuity/<session>/<clip_id>, pulls the bounded range of stored video and audio tokens the decoder will need, and concatenates those with the sampler's new tokens after the native overlap. Note the choice: the stored tail is what gets kept, not the sampler's freshly sampled overlap. The overlap is sampled so the model has continuity context and then thrown away, because the source is immutable - re-decoding an extension shouldn't quietly rewrite the second you already approved. It then stages an immutable delta keyed to its parent and computes a render plan (frame offsets, crop start, sample boundaries) that travels forward inside segment_context.

It also stores at the source canvas. Keep this node before any spatial latent upscale, always. If you upscale the new sample first, its shape no longer matches the pinned source and the continuation dies.

Wiring

render_latent goes to the optional Enhanced Upscale (or straight to Segment Decode), segment_context goes to both - the upscaler and the decode node - unchanged, and ticket goes to Publish Export placed after your actual video exporter. Publish is what promotes a staged take to a real checkpoint, and it only does that if the exporter produced a valid file. That ordering is the whole integrity story: no exported file, no advance.

Installing it

Manager → search DaSiWa-Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/darksidewalker/ComfyUI-DaSiWa-Nodes
cd ComfyUI-DaSiWa-Nodes
pip install -r requirements.txt

You need the H3 model, CLIP, the video VAE and the 32 kHz audio VAE regardless; H3 continuity leans on PyAV (av>=18) for media probing. The full requirements file also pulls nvidia-vfx, llama-cpp-python and transformers for other nodes in the pack - heavy, unrelated to this one. One more thing worth stating plainly: MiniMax H3's community licence excludes the US, EU, UK and Korea, so check that before you invest in a long continuity chain.

Where people get burned

"Continuity source changed after sampling preparation; run the Guide again." Something altered the pinned checkpoint between the Guide running and Prepare running. Re-run the Guide; don't try to force it through.

Delta chains are not independent. A delta checkpoint is meaningless without its parent, and nothing cleans up or migrates for you. Back up a take, back up the whole chain, root included.

Segment publication is strict. No interpolation, no ping-pong, no downstream time trimming - the exported duration has to match the plan or Publish refuses and the source stays pinned. Duration-preserving interpolation is fine.

The first take is a special case. With no continuation active, Prepare stages the take as a root and renders it whole; there's no tail to borrow. It works, but the render plan differs, and if you hand-build a plan for that case you'll get "Invalid first-take segment render offsets."

CategoryDaSiWa/MiniMax H3

Inputs (2)

NameTypeDefaultDescription
sampledLATENTSource-resolution H3 sampler output; hidden sampled overlap is discarded, not rendered.
contextDF_H3_CONTINUITY_CONTEXTThis sampler’s Director Guide continuity_context. Works in both Director output modes: Full timeline behaves like Append & Stage, New segment only renders the bounded segment.

Outputs (3)

NameTypeDescription
render_latentLATENT—
segment_contextDF_H3_CONTINUITY_CONTEXT—
ticketDF_H3_CONTINUITY_TICKET—