Nodes/ComfyUI-MiniMaxH3-PrefixStream/MiniMax H3 Continuation Config
ComfyUI Node

MiniMax H3 Continuation Config

The one knob that decides how your MiniMax H3 clips stitch together

By knoic·Created 2 days ago·Updated about 16 hours ago· 0
MiniMax H3 Continuation Config
    • cache_config
    cache_modeNative Masked AV (Recommended)
    continuation_frames39

    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_config slot, and
    • the Trim Prefix node's cache_config slot, 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.

    CategoryMiniMaxH3/PrefixStream

    Inputs (2)

    NameTypeDefaultDescription
    cache_modeCOMBONative Masked AV (Recommended)Native Masked AV 将上一段 AV latent 直接复制到目标开头,并用 ComfyUI 原生 video/audio denoise mask 分别保护;Safe Native 是短片段或旧工作流的兼容备选。
    continuation_framesCOMBO39用户可见的视频续写上下文帧数。39 帧约 1.625 秒;较长选项会自动下取整到精确音视频公共边界。

    Outputs (1)

    NameTypeDescription
    cache_configMINIMAX_CACHE_CONFIG