Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Chain Policy
ComfyUI Node

MiniMax H3 Chain Policy

One knob for how your MiniMax H3 scenes connect — transition and audio in a single wire

By ethanfel·Created 17 days ago·Updated about 20 hours ago· 315
MiniMax H3 Chain Policy
    • chain_policy
    • status
    incoming_transitionguide
    final_audiogenerated
    source_referenceoff
    generated_continuityon
    lock_source_audiofalse

    Chain Policy is the part of the Contex Loop pack that keeps you from drowning in per-scene continuity widgets. In 0.4 of this pack you had to reason about continuation_mode, context_length, audio_mode, and audio-context lengths all at once, per scene. 0.5 collapsed that into one small node with five controls, and it's the first thing you wire when you start a production graph.

    The pitch: you set how a scene enters (its boundary with the predecessor) and what the final soundtrack is in one place, and the Plan stores the resolved behavior rather than the graph topology. That last part matters more than it sounds - it's why your saved checkpoints stay compatible with a rebuilt or re-laid-out workflow. The policy is a h3_chain_policy_v1 record; Plan expands it into canonical audio and transition records before hashing, so compatibility follows what you chose, not how you wired it.

    What the four transition choices mean

    incoming_transition is the default boundary for every scene (a scene can still override it in Plan Studio):

    • cut - no carried picture. A hard edit.
    • guide - 22-frame RGB continuation of the previous scene's motion. The tested everyday default.
    • hard_av - a protected 39-frame picture and audio prefix. The previous scene's tail is carried into the next one and shielded from denoising.
    • soft_av - the same hard picture prefix, but with a short feathered audio release so the sound hands off less abruptly.

    The 22- and 39-frame numbers aren't arbitrary: they line up with H3's own frame counts so the AV clocks meet exactly. That's the kind of detail the old pack made you know by heart, and this node just hides it.

    Audio, on three independent axes

    • final_audio - what gets muxed into the final MP4: H3's generated sound, the exact source track, or nothing. This doesn't touch generation.
    • source_reference - use the matching Source Timeline audio as guidance while H3 generates this scene's sound (influence, not a copy).
    • generated_continuity - carry the previous scene's sampled audio latent across the boundary, so sound doesn't restart from nothing each scene. Guide gets 22 frames of it automatically; AV follows the video boundary.

    And there's lock_source_audio, the hammer: it encodes each scene's exact Source Timeline window directly into the target audio latent and protects the whole audio mask from denoising. If your dialogue must be word-for-word the source, this is the switch. It automatically overrides source_reference and generated_continuity, because they'd compete with an exact target clock. Pair it with final_audio: source and the final MP4 keeps the original waveform too.

    Outputs: chain_policy (wire it to the Plan's chain_policy input) and a status string that tells you the resolved transition, soundtrack, reference, and lock summary.

    Install

    Part of ComfyUI-MiniMaxH3-Contex-Loop - install the pack once and you get all its nodes. ComfyUI Manager (search "ComfyUI-MiniMaxH3-Contex-Loop") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git
    

    then restart. No pip dependencies; you do need a current ComfyUI with the native Add Guide for MiniMax H3 support (ComfyUI PR #15439), and note the models aren't bundled - the MiniMax H3 weights themselves are license-locked out of the US, EU, UK and South Korea.

    Gotchas

    The easiest mistake is treating lock_source_audio as "make it sound like the source" in a soft way. It's not - it's exact, and it switches the other two audio axes off. If you just want a vibe, use source_reference instead. Also remember the transition describes how a scene consumes its predecessor; editing it after the predecessor is already rendered doesn't change the finished predecessor, and changing resolved behavior of a saved scene is exactly the kind of edit that invalidates a resume. Keep it simple for a first run: guide + generated + continuity on.

    Categoryconditioning/minimax/contex_loop/policies

    Inputs (5)

    NameTypeDefaultDescription
    incoming_transitionCOMBOguideDefault boundary entering a scene: Visual Cut = no carried picture; Guide = 22-frame RGB continuation; Hard AV = protected 39-frame picture/audio prefix; Soft AV = the same hard picture prefix with a short audio release. A scene can inherit or override this default in Plan Studio.
    final_audioCOMBOgeneratedSoundtrack muxed into the final MP4: H3's saved generated sound, the exact source track, or no soundtrack.
    source_referenceCOMBOoffUse the matching Source Timeline audio as guidance while H3 generates this scene's sound. This does not copy the source waveform into the result or choose the final MP4 soundtrack. To force the exact source waveform during generation, enable Lock source audio; to put it in the final MP4, set Final audio to source. Lock automatically turns this reference off.
    generated_continuityCOMBOonOn carries the previous sampled audio latent across scene boundaries. Guide uses the tested automatic 22-frame sound context; AV follows its exact shared video boundary. Off leaves target audio fully denoisable. This does not select the final soundtrack. Lock source audio overrides this off.
    lock_source_audioBOOLEANfalseEncode each scene's exact Source Timeline window directly into the target H3 audio latent and protect the complete audio mask from denoising. This automatically replaces Source reference and Generated continuity for generation. Choose Final audio=source when the final MP4 must retain the original waveform.

    Outputs (2)

    NameTypeDescription
    chain_policyH3_CHAIN_POLICYCombined 0.5 policy to connect to Chain Plan's chain_policy input.
    statusSTRINGResolved transition, soundtrack, source-reference, generated-continuity, and exact-target lock summary.