MiniMax H3 Continuation Applier
Carrying your H3 clip's context into the next one
- model
- conditioning
- cache_config
- context_latent
- target_latent
- model
- conditioning
- session
- masked_latent
If the Continuation Config node is the policy, MiniMaxPrefixCacheApplier ("MiniMax H3 Continuation Applier") is the machinery. It's the node that actually takes the previous clip's video and audio latent, plants it into the head of your next clip, and hands the sampler a masked latent so ComfyUI regenerates only the new stuff. Drop it into an existing native H3 workflow between the reference node and the sampler and your clips start chaining instead of starting over.
The pack's whole design philosophy is low intrusion: it doesn't patch the H3 DiT, doesn't modify ComfyUI source, and it doesn't care which prompt, sampler, or scheduler you're using. You keep your native chain and insert this one node in line.
What it does under the hood
MiniMax H3 packs video and audio into one joint LATENT (a NestedTensor, in ComfyUI's implementation) - so one pink wire carries both streams. The applier:
- Unpacks video and audio from your previous
context_latent. - Slices the canonical tail - a phase-aligned length on the 39/90/141/192-frame grid.
- Copies that tail into the head of the new
target_latent. - Builds separate video and audio denoise masks protecting the copied region.
- Re-packs everything into a
masked_latentwhosenoise_maskholds both masks. - Strips any native keyframes that fall inside the protected head - so a frame-0 reference can't fight the copied latent context.
In Safe Native fallback mode (see the Config node), it skips the masks and instead injects grid-aligned keyframe conditioning through prepare_next_clip. The applier decides which path runs based on your cache_mode and whether the geometry can actually fit - if your source or target is too short for native masking, it logs a warning and drops to Safe Native automatically rather than crashing.
The inputs and outputs that matter
Required: model (your H3 model patcher) and conditioning (the positive conditioning, normally from MiniMaxH3ReferenceToVideo). Optional but usually present: cache_config from the Config node, context_latent, and target_latent.
context_latent- the previous clip's complete joint AV latent. Leave it empty for the very first clip - that's the initial-generation signal, and the node simply passes the target through with no protected prefix. On later clips, wire the Clip Bin Picker'slatentoutput here.target_latent- the fresh empty target, normally straight fromMiniMaxH3ReferenceToVideo. Native Masked AV requires this; in that mode you'll get a clear error if you leave it disconnected.
Outputs: model and conditioning (which you route back into the sampler chain - the applier returns the model patched for Safe Native mode), session (a MINIMAX_SESSION carrying clip count and the actual protected geometry - feed this to the Trim Prefix node and the telemetry monitor), and masked_latent - the one to plug into your sampler's latent_image input.
A real wiring picture
In the pack's 42-node reference workflow the chain reads: MiniMaxH3ReferenceToVideo → positive to applier's conditioning, its target LATENT to target_latent; the applier's masked_latent → SamplerCustomAdvanced.latent_image, its model → the scheduler, its session → the Trim Prefix node. The Clip Bin Picker's latent feeds context_latent, and its clip_id carries on to the Saver for lineage. Drag the example JSON into a canvas and study those five wires - that's the whole pattern.
Install & gotchas
Same story as the rest of the pack: no weights to fetch, no keys. Install via ComfyUI Manager (search "MiniMaxH3 PrefixStream") or clone into custom_nodes and pip install -r requirements.txt (just torch, safetensors, pillow - things ComfyUI already has). Restart, then Ctrl+F5 in the browser.
The recurring gotcha is ComfyUI freshness. Native Masked AV probes your build for H3 per-stream mask support (the error message names PR #15375) and refuses if it's absent. That's not the node being fussy - the masking genuinely lives in recent ComfyUI core, so update ComfyUI, restart completely, and reload the workflow before you blame anything else. If it still auto-falls back to Safe Native with a console warning, your source clip is under 39 frames or your target can't host the protected head - lengthen the clip rather than fighting the geometry.
And yes, for first generation with no context_latent, the node is effectively a pass-through plus a session object. That's by design - keep it wired even on clip one so the trimmer and telemetry downstream know what happened.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| conditioning | CONDITIONING | — | |
| cache_configopt | MINIMAX_CACHE_CONFIG | — | |
| context_latentopt | LATENT | 上一段完整的 H3 音视频 LATENT。首段生成时留空。 | |
| target_latentopt | LATENT | 连接 MiniMaxH3ReferenceToVideo 的目标 LATENT;Native Masked AV 会输出带独立音视频 noise_mask 的采样 latent。 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| conditioning | CONDITIONING | — |
| session | MINIMAX_SESSION | — |
| masked_latent | LATENT | — |