Nodes/ComfyUI-H3-AudioRefine/H3 Audio Refine Mask
ComfyUI Node

H3 Audio Refine Mask

H3 Audio Refine Mask, explained

By Adudeguyman·Created 4 days ago·Updated about 21 hours ago· 59
H3 Audio Refine Mask
  • latent
  • LATENT
video_denoise0.00

MiniMax H3 is the first open-weight video model that mints stereo audio natively - but if you're running it through a 4-step Turbo LoRA, you've probably met the catch: 4-step video can look fine while 4-step audio comes out thin, buzzy, or full of noise-floor junk. Re-rendering the whole clip at 20 steps fixes that but is brutally slow. H3 Audio Refine Mask is the middle path: it takes your already-sampled latent, locks the video stream in place, and lets a second, longer sampler pass denoise only the audio.

What makes this trick possible is that H3 packs video and audio into a single nested latent (a NestedTensor with a video slice and an audio slice), and ComfyUI's native MiniMax H3 support already knows how to run a masked partial-denoise pass on it.

How it works

This node just attaches the mask: video = 0.0 (preserve), audio = 1.0 (generate). Hand the result to any stock sampler and ComfyUI's own masked-inpaint machinery does the rest - every step, the clean video is injected back in at the visual conditioning timestep (0.999), the same treatment keyframe conditioning gets, so the model denoises the audio in the context of your finished picture. At video_denoise 0.0 the final blend returns the video bit-identical to what you sampled. No custom sampler, no monkeypatching, nothing clever to maintain.

The inputs

Only a couple of fields exist, and really only one needs your attention:

  • latent - the sampled H3 AV latent from your first pass. It has to be a real packed video+audio latent: hand it a plain latent and the node raises a clear error rather than guessing.
  • video_denoise - defaults to 0.0. Nudge it above zero only if you want the refinement pass to partially rework the video too. For the "audio-only polish" job, leave it alone.

Wiring it into a workflow

Wire the LATENT output into a stock SamplerCustomAdvanced (with BasicScheduler set to your desired denoise) or a KSampler with denoise < 1.0, and set that denoise to the audio re-noise depth: 0.3–0.6 keeps pass-1 audio content and cleans up artifacts; 1.0 regenerates the audio from scratch against the frozen video. This is the composable variant of the pack - you keep full control of the scheduler and guider instead of letting a convenience node decide, which also makes it the natural pick for A/B testing different refinement schedules.

Installing

Install is the usual two options. ComfyUI Manager: search ComfyUI-H3-AudioRefine, click Install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-H3-AudioRefine.git

No Python dependencies - the pack ships with an empty deps array and uses only torch, numpy, and ComfyUI internals. What it does need is a ComfyUI build with native H3 support including the AV masked path (0.33.x against current master), so update ComfyUI before you blame the node.

Troubleshooting and gotchas

Two gotchas to know before you hit them. First, this node only refines - it doesn't speed the refinement up. Because H3 runs video and audio through one fused transformer, each audio-only step still costs nearly a full forward pass; the saving is total step count, not per-step cost. Second, if the refine pass OOMs, it's often ComfyUI's known dynamic-VRAM-streaming driver bug rather than this pack - the README points at --cuda-device 0 and --disable-pinned-memory as workarounds:

python main.py --cuda-device 0 --disable-pinned-memory

And if the refinement is slow, that's exactly the problem the pack's third node - H3 Frozen Video Cache - exists to solve.

Categorylatent/minimax

Inputs (2)

NameTypeDefaultDescription
latentLATENTSampled MiniMax H3 AV latent (video+audio) from a previous pass.
video_denoiseoptFLOAT0.000–1Denoise mask value for the video stream. 0.0 freezes video exactly. Values > 0.0 let the refinement pass partially rework video too.

Outputs (1)

NameTypeDescription
LATENTLATENT