MiniMax H3 • LipSync Latent Setup
The honest way to do lip-sync in latent space
- av_latent
- audio_latent
- av_latent
Lip-sync in ComfyUI is usually a post-process: generate the video, run a separate mouth-matching model, paste the result back. MiniMax H3 does it properly - the audio is part of the model's conditioning, so the mouth moves because the soundtrack is baked into the latent that's being denoised. This node is the manual version of that setup. It replaces the native audio stream inside an H3 AV latent with your own encoded audio, then configures how strongly video and audio each get denoised during sampling. Use it when you're building the sampling graph by hand and want explicit control.
What it does
Inputs, in the order that matters:
av_latent- the H3 AV latent you're about to sample.audio_latent- your replacement audio, already encoded by the Encode Audio Stream node. This is what drives the mouth.fit_mode(strict/crop_pad) andalignment(start/end/center) - how the replacement audio is fitted to the latent's length.crop_padwithstartis the pragmatic default;strictwill error on any mismatch.video_denoise(default 0.35) - how much the video gets regenerated around the audio cue. Too low and lips barely move; too high and you lose the reference look.audio_denoise(default 0) - how much the replacement audio itself gets re-denoised. At 0 it's preserved exactly, which is what you want for lip-sync - the source performance keeps its timing and you don't want the model "fixing" your dialogue.
The one output is the prepared av_latent, ready for the sampler.
The mechanism
Under the hood it's two operations chained: Replace Stream (stream=audio, at your denoise level) followed by independent video/audio denoise controls via the noise-mask path. So you get one node that both swaps the soundtrack and sets up the per-stream denoise split - the two things a lip-sync run needs, combined so you can't forget the second one.
One thing the pack is very clear about: for performance prompts, describe the semantic action ("speaks", "sings") and let the source audio own the phonetic timing. The model doesn't need your prompt to spell out mouth shapes; it reads them from the audio latent.
Why use this instead of the Setup node's lip_sync mode
The Long Media Setup node has an audio_mode=lip_sync that does all of this for you in the standard workflow, and that's the recommended path for most people. This node is for the "manual" workflow mode and for when you're assembling AV latents yourself - or when you want to tune video_denoise separately from everything else and the Setup's fixed lip-sync policy won't let you. Think of it as the same feature, but with the guardrails off.
Install
Ships in ComfyUI-MiniMax-H3-LongMedia. Manager search "MiniMax-H3-LongMedia", or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia
restart, and have the H3 checkpoint plus video and audio VAEs installed (MiniMaxAI/MiniMax-H3 on HuggingFace; community license excludes US/EU/UK/Korea).
Troubleshooting
The classic fail: you connect raw AUDIO instead of an encoded audio_latent. This node expects the output of Encode Audio Stream, not a waveform - if nothing changes, check the wire. If strict throws a length error, your encoded audio doesn't match the latent's grid-snapped duration; switch to crop_pad. And if the mouth moves but the video looks like it's fighting the audio, lower video_denoise toward 0.15–0.25 - you're over-denoising the image and losing the reference frame. If lip-sync timing drifts across a multi-segment run, check synchronized on the AV Info node after each segment, not just the first.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| av_latent | LATENT | — | |
| audio_latent | LATENT | — | |
| fit_mode | COMBO | 2 options: strict, crop_pad | |
| alignment | COMBO | 3 options: start, end, center | |
| video_denoise | FLOAT | 0.350–1 | — |
| audio_denoise | FLOAT | 0.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| av_latent | LATENT | — |