Nodes/ComfyUI-MiniMaxH3-Context-Loop/MiniMax H3 Lip-Sync Options
ComfyUI Node

MiniMax H3 Lip-Sync Options

Making H3 lipsync a real song instead of mumbling over it

By ethanfel·Created 30 days ago·Updated about 19 hours ago· 383
MiniMax H3 Lip-Sync Options
  • voice
  • lip_sync_options
  • voice
  • status
preroll_seconds1.00
lookahead_seconds0.20
audio_denoise0.00
gap_denoise0.15
gate_hold_seconds0.20

MiniMax H3 is one of the first open-weight video models with genuinely native audio - the kind where a character can sing over a real track and the model keeps the music intact while the mouth moves. In the MiniMax H3 Context Loop pack that's the Generation Profile's Lip-sync to source audio mode: the exact source song drives generation and stays the final soundtrack. MiniMax H3 Lip-Sync Options is the node that gives you control over how that happens - and it exists because the naive version of lipsync has a visible artifact problem.

Here's the artifact: H3's audio is encoded as latent "ticks," and if you cut the song at the scene boundary with a hard edge, the first and last kept ticks get encoded against an artificial silence. The mouth starts wrong, or the tail dies. This node fixes that with encode-time context - you render a little real song before the scene (preroll) and a little after (lookahead), let the latent breathe, then discard those leading/trailing ticks. The kept part has natural musical context baked in.

The vocal-gate idea

The subtler knob is what happens between phrases. With no extra inputs, "lipsync to song" tends to freeze the whole song latent so H3 can't garble it - but that also means no visual life between sung lines. If you connect an isolated vocal stem (voice only, no instruments), this node becomes a gate: while the vocal is active it holds the exact-song latent at your audio_denoise value (keep it at 0 to freeze perfectly), and in the gaps between detected phrases it lets H3 regenerate up to gap_denoise - typically a small nonzero value so the visual reacts between lines without wrecking the music. The gate holds for gate_hold_seconds around each vocal tick plus a short fixed release.

Inputs

  • preroll_seconds (default 1.0) - real song context encoded before the scene, then discarded. 0 gives the old hard-cut behavior.
  • lookahead_seconds (default 0.2) - following-song context after the scene, then discarded.
  • audio_denoise (default 0) - mask value while the vocal is active. 0 freezes the exact song latent. No vocal stem connected means this applies to the entire song, so leave it 0 in that case.
  • gap_denoise (default 0.15) - the between-phrases value; only used when a stem is connected.
  • gate_hold_seconds (default 0.2) - margin around detected vocal ticks.
  • voice (optional) - the isolated, source-aligned vocal stem.

Outputs and wiring

Three outputs: lip_sync_options (feed to Generation Profile's lip_sync_options input), voice (pass through to Chain Context's lip_sync_voice), and a status string. The wiring is:

source vocal stem → Lip-Sync Options voice
Lip-Sync Options lip_sync_options → Generation Profile lip_sync_options
Lip-Sync Options voice → Chain Context lip_sync_voice

One caveat worth repeating: these options are active only while Generation Profile's audio profile is set to Lip-sync to source audio. Connect the node under any other profile and it's inert. And the settings only take effect when this options node is actually attached - no options node means the established hard-cut behavior, unchanged.

How to install

Same pack, same drill - ComfyUI Manager (search "MiniMax H3 Context Loop") or:

cd ComfyUI/custom_nodes
git clone https://github.com/seitanism/ComfyUI-H3-Motion-Context-MultiRef.git
git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop.git

Restart ComfyUI. Your own H3 models and VAEs are required; the source track and stem are yours too (ffmpeg on PATH helps for the audio handling).

Common issues

The biggest practical gotcha is feeding a vocal stem that isn't aligned to the project source track - the SHA-256 fingerprint of the stem is recorded in the Plan's compatibility data, and a mismatched stem produces a gate that fights the music. Keep your stem and source track on the same timeline. And if your "lipsync" looks frozen, that's audio_denoise: 0 doing its job - raise it slightly only if you genuinely want H3 to redraw over the voice.

Categoryconditioning/minimax/context_loop/policies

Inputs (6)

NameTypeDefaultDescription
preroll_secondsFLOAT1.000–4Encode this much real song before the scene, then discard those leading latent ticks. This gives the kept first ticks their natural audio context. Set 0 for legacy hard-cut encoding.
lookahead_secondsFLOAT0.200–2Encode this much following song after the scene, then discard it. This prevents the last kept audio ticks from being encoded against an artificial hard end. Set 0 for legacy behavior.
audio_denoiseFLOAT0.000–1H3 denoise-mask value while the vocal is active. 0 freezes the exact song latent. This value applies to the complete song when no vocal stem is connected to Chain Context.
gap_denoiseFLOAT0.150–1Denoise-mask value between detected vocal phrases. It is used only when an isolated vocal stem is connected to Chain Context.
gate_hold_secondsFLOAT0.200–2Keep the exact-song mask active for this margin around detected vocal ticks. A short fixed release is added after each phrase.
voiceoptAUDIOOptional isolated vocal stem aligned to the project source track. Connect this node's voice output to Chain Context. Its SHA-256 fingerprint is stored in Plan compatibility data.

Outputs (3)

NameTypeDescription
lip_sync_optionsH3_LIP_SYNC_OPTIONSOptional settings for Generation Profile. They are active only with Lip-sync to source audio.
voiceAUDIOOptional unchanged vocal stem to connect to Chain Context's lip_sync_voice input.
statusSTRINGResolved contextual encoding and vocal-gate recipe.