Nodes/ComfyUI_zura_nodes/Zura · Keep Selected Audio During H3 Sampling
ComfyUI Node

Zura · Keep Selected Audio During H3 Sampling

Make H3 use the take you actually chose

By ZURAVFX·Created about a month ago·Updated a day ago· 2
Zura · Keep Selected Audio During H3 Sampling
  • latent
  • audio_vae
  • audio
  • LATENT

H3 generates audio and video together in one latent. That's the whole pitch - native stereo sound from the same pass. It's also the exact reason people get annoyed: you upload a clean voice track, ask for a new performance, and the model re-synthesises the speech with its own idea of how the line should sound. Sometimes better. Usually not what you wanted.

This node stops that. It swaps H3's generated audio stream for the track you selected, encoded and pinned as non-denoised context.

How it works

The latent H3 hands around is a NestedTensor holding two things: a 24-channel video tensor and a 32-channel, 2-channel-per-frame audio tensor. Zura's node takes that pair apart, resamples your AUDIO to the audio VAE's own rate, upmixes mono to stereo, pads with real waveform silence out to the template's exact length, and encodes it through the H3 audio VAE.

Then it rebuilds the nested latent with the encoded audio in the audio slot - and, crucially, sets the audio half of the noise mask to zeros. A zero noise mask means "do not denoise this"; the video half keeps whatever mask it had (or an all-ones mask if there wasn't one). Result: the sampler free-runs the picture and treats the speech as fixed context, so mouth motion follows that performance.

The approach isn't invented here - the docstring credits Pixaroma's H3 Audio Sync workflow for demonstrating the audio-reference-versus-fixed-stream distinction. What Zura does is package it as a validated node with the rate/padding handling done for you.

Inputs and outputs

  • latent - LATENT, a MiniMax H3 audio-video latent. It has to be the nested two-tensor kind; a plain video latent gets rejected.
  • audio_vae - VAE, the MiniMax H3 audio VAE specifically.
  • audio - AUDIO, your track. Mono or stereo, finite samples, one take.
  • LATENT (output) - the same latent with the audio stream replaced and frozen.

Install

Standard pack install:

cd ComfyUI/custom_nodes && git clone https://github.com/ZURAVFX/ComfyUI_zura_nodes
pip install -r ComfyUI_zura_nodes/requirements.txt

Then ComfyUI/models/vae/minimax_h3_audio_vae_fp32.safetensors from Comfy-Org's MiniMax-H3 repo, alongside the video VAE and the base weights. Restart ComfyUI after dropping the files in. Remember the H3 community licence is territory-restricted - the hosted Hailuo API is available everywhere, the weights are not.

Common issues

"Connect a MiniMax H3 audio-video latent." You fed it a video-only latent. Whatever came out of the native reference-to-video conditioning node is what belongs here, not the output of a VAEEncode.

"Choose the MiniMax H3 audio VAE for this speech track." Wrong VAE - often the video one by muscle memory. It usually shows up as a channel or length mismatch rather than a clean complaint.

The audio is there but the length is wrong. The node derives the sample count from the latent template (the 40-samples-per-audio-token contract), truncating and padding to fit. A track much longer than your clip gets cut, not stretched. Trim first with a duration node if you need a specific section - and if your graph is windowed, put the track on a full timeline before slicing, or each window will start its own copy from zero.

You changed the track and nothing happened. Changing the AUDIO input re-encodes and re-pins it, but the sampler result also depends on seed and model. If the output looks identical, check you're not re-running a cached branch - the latent changed, so it should have re-run, but a graph with an always-dirty node upstream can hide which section actually re-executed.

One thing this can't do. It locks audio into the sampling context. It does not fix a performance that's already wrong - if the original speech has a mouth-closed moment, pinning the audio won't invent a jaw movement that isn't in the source performance.

CategoryZura/Artist Studio

Inputs (3)

NameTypeDefaultDescription
latentLATENT—
audio_vaeVAE—
audioAUDIO—

Outputs (1)

NameTypeDescription
LATENTLATENT—