MiniMax H3 Continuation Config
The one knob that decides how your MiniMax H3 clips stitch together
- cache_config
MiniMax H3 is a 33B omni-modal video model that generates native, synced audio alongside the picture - but it's a clip generator, not an hour-long filmmaker. Left to itself it gives you 5–15 seconds, and each new clip starts from a blank slate: no memory of the character, the lighting, or the last action. That's the gap this whole pack exists to fill, and MiniMaxPrefixCacheConfig ("MiniMax H3 Continuation Config") is where you make the one strategic decision the pack can't make for you: how the next clip should inherit context from the previous one.
The pack's author deliberately kept this node tiny - two choices. That's the point. Everything else about the continuation (mask geometry, caching dtype, device placement) is computed for you, so beginners don't drown in knobs that used to live on these config nodes in older suites.
The two settings
cache_mode picks the continuation strategy:
- Native Masked AV (Recommended) - the default, and the one you want. The previous clip's clean video and audio latents get copied into the head of the next target, then protected with ComfyUI's native per-stream denoise masks (a video mask and an audio mask, independently). The sampler regenerates only the genuinely new tail. This is the approach the pack credits to Herrgott's H3 Infinite Continuation Suite, re-implemented on ComfyUI's own masking rather than monkey-patching the model.
- Safe Native (Fallback) - a compatibility path that skips the masks and instead injects grid-aligned keyframe conditioning. You reach for it when you're on an older workflow or a ComfyUI build without H3 AV-mask support, or when your clip geometry is too short for native masking to fit. The Continuation Applier auto-drops to it when the math won't work, so most people never touch this.
continuation_frames is the protected overlap length, on H3's canonical frame grid: 39, 90, 141, or 192 video frames. Default 39 is about 1.625 seconds - and that's not an arbitrary number. H3's VAE runs on a spatiotemporal grid where 39 video frames lands exactly on 65 audio latent ticks, so the AV boundary stays phase-aligned. Longer options give the model more to copy (better continuity, more reference) but eat into your new clip's length - the target clip has to be long enough to host the whole protected head plus fresh content.
Wiring and output
This node has no model, no image, no latent inputs. It just emits a single cache_config object (custom type MINIMAX_CACHE_CONFIG) that you feed into two places in the chain:
- the Continuation Applier's
cache_configslot, and - the Trim Prefix node's
cache_configslot, so the trimmer knows how many overlapping frames to cut off later.
You'll also see it threaded through the applier's session object downstream - connect the config once at the applier and the session carries the geometry forward, so you don't rewire anything per clip.
Installing and first steps
This is a pure-comfy node - no API, no key, no model files to download. Install via ComfyUI Manager (search "MiniMaxH3 PrefixStream") or:
cd ComfyUI/custom_nodes
git clone https://github.com/knoic/ComfyUI-MiniMaxH3-PrefixStream.git
cd ComfyUI-MiniMaxH3-PrefixStream
pip install -r requirements.txt
Then restart ComfyUI and hard-refresh the browser (Ctrl+F5) - the nodes appear under MiniMaxH3/PrefixStream.
The one prerequisite that isn't in this repo: Native Masked AV needs a current ComfyUI build with MiniMax H3 AV-mask support (the code probes for it and errors out with a PR #15375 reference if it's missing). If you hit that error, update ComfyUI rather than blaming the pack. And remember the elephant in the room: the MiniMax H3 weights themselves ship under a community license that excludes the US, EU, UK and South Korea - this pack changes nothing about that.
Start with Native Masked AV + 39. It's the setting the author ships in the example workflow, it's the cheapest on VRAM, and you can grow the context later once you've seen a clean continuation actually work.
Where people get burned: choosing 141 or 192 frames for a short target clip and getting an auto-fallback to Safe Native (with a console warning) because the copied context would have consumed the whole target. The applier handles the snap-down gracefully, but if you want long contexts, make the target clip long enough to hold them.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| cache_mode | COMBO | Native Masked AV (Recommended) | Native Masked AV 将上一段 AV latent 直接复制到目标开头,并用 ComfyUI 原生 video/audio denoise mask 分别保护;Safe Native 是短片段或旧工作流的兼容备选。 |
| continuation_frames | COMBO | 39 | 推荐默认 39 帧:1.625 秒 / 65 个音频 tick,音画时长精确对齐。5 帧仅约 0.208 秒 / 8 个 tick,音频上下文很短且需取整,声音接续可能不稳定。按 H3 的 17k+5 帧网格复制前缀。 |
| audio_tail_carryoveropt | COMBO | Match Video Handover | Match Video Handover 按视频交接位置截取音频;Full Previous Tail 也保留被视频舍弃的尾部声音,可能导致音画交接位置不同。 |
| audio_feather_ticksopt | INT | 00–16 | 仅 Masked Prefix 模式生效:音频前缀末尾允许重新生成的 tick 数。0 完全保护;大于 0 会释放部分音频,可能改变交接声音。开启 reference_noise 时强制为 0。 |
| video_context_denoiseopt | FLOAT | 0.000–1 | 实验项:0 完全冻结视频前缀;大于 0 使用原生软遮罩允许修正历史上下文。可对比 0/0.03/0.06;可能改善历史斑纹,也可能破坏接缝和运动一致性,尚无 H3 画质验证。 |
| reference_noiseopt | BOOLEAN | false | 参考帧渐变注噪:所有档位均从 0.4 平滑降至末帧 0。使用带噪/干净两次 VAE 编码的差值作用于原始 latent,避免直接替换造成额外编码偏差。继承的音频不注噪。需接视频 vae 和上一段完整 latent;仅支持 Native Masked AV。 |
| audio_continuation_modeopt | COMBO | Masked Prefix | Masked Prefix 冻结目标音频前缀;Native Audio Guide 通过 H3 原生音频引导条件继承前段声音,目标音频正常生成,不使用音频冻结或 feather。实验选项,需对照验证听感。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cache_config | MINIMAX_CACHE_CONFIG | — |