Nodes/ComfyUI-vlo/vlo Set Audio Latent Binary Masks
ComfyUI Node

vlo Set Audio Latent Binary Masks

Mask the sound, not just the picture

By PxTicks·Created 3 months ago·Updated a day ago· 0
vlo Set Audio Latent Binary Masks
  • audio_latent
  • masks
  • audio_vae
  • audio_latent
mask_fps0.00
threshold0.50
resize_modenearest
existing_mask_modeoverwrite
layout_overrideauto
audio_latent_rate0.00

Modern open video models don't just draw a picture - LTX and MiniMax H3 generate audio with it, jointly, from a shared AV latent. That's great until a generation nails the video and mangles one section of the sound, or you want to regenerate just the dialogue in a region while keeping everything else. Video inpainting has a clean mental model (mask the pixels, resample). vloSetAudioLatentBinaryMasks is the equivalent for the audio stream: it stamps a temporal binary noise mask onto an audio latent, so the sampler re-rolls the sound inside the masked time range and leaves the rest alone.

The stock SetLatentNoiseMask handles video masks. Audio has no such standard primitive, and the layouts are model-specific, which is exactly why this node exists: it resolves the audio latent's layout and rate from the latent and VAE metadata itself, and knows the two current families - LTX's [B,C,T,F] layout and MiniMax H3's [B,C,S,T], with 25 Hz audio latent rate for LTX and 40 Hz for MiniMax.

What you feed it

  • audio_latent - a standalone audio latent, or a nested AV latent (a joint H3 or LTX one). If it's AV, the video mask is preserved; only the audio mask changes.
  • masks - binary mask frames. Each frame is reduced to active/inactive via threshold (default 0.5, "any pixel meets it"): the spatial content of the mask is irrelevant, only when it's active. Think of it as drawing an audio automation envelope, not a region.
  • mask_fps - the FPS your mask frames were made at. Above zero, mask timestamps map onto the VAE's audio latent rate; zero (default) stretches the whole mask batch across the full audio latent length.
  • resize_mode - nearest (default) keeps hard frame ranges; linear smooths the timeline before the final binary threshold.
  • existing_mask_mode - overwrite (default), add (takes the max with any existing mask), or subtract (clears regions out of an existing mask). Subtract is how you carve a retake window out of a mask you built earlier.

The last three are convenience/advanced: layout_override (auto prefers metadata, then sniffs the VAE), audio_latent_rate, and an optional audio_vae that lets the node resolve rate and layout automatically when the latent carries no metadata. The output is the same audio_latent type with its noise mask set, ready to feed your sampler.

Where people get burned

Audio latent rates are not a place for vibes. If your masks were authored at a different FPS than you declare in mask_fps, the masked region lands in the wrong part of the timeline - that's the input to double-check first. And on a nested AV latent, don't expect the video mask to ride along unless the node for video masks ran first; this node explicitly changes only the audio stream. It comes from the ComfyUI-vlo pack, which also ships an LTX-only sibling (LTX Set Audio Latent Binary Masks) with a simpler fixed set of inputs - this node is the generalist that adds mask FPS, layout resolution and the MiniMax layout.

Install

Whole-pack install, nothing extra to pip:

cd ComfyUI/custom_nodes
git clone https://github.com/PxTicks/ComfyUI-vlo.git

then restart ComfyUI, or search "ComfyUI-vlo" in ComfyUI Manager (the repo is young enough that the clone path is the reliable one). And the elephant: MiniMax H3's weights are big and carry a licence that excludes the US, EU, UK and Korea - LTX is the consumer-VRAM-friendly route if that's what you have, though its own licence is engine-style (free under $10M/yr revenue), not permissive open source.

Categorylatent/audio

Inputs (9)

NameTypeDefaultDescription
audio_latentLATENTStandalone audio latent or nested AV latent. Nested video masks are preserved while only the audio mask is changed.
masksMASKBinary mask frames. Each frame is reduced to active/inactive; spatial dimensions do not affect the audio mask.
mask_fpsFLOAT0.000–1000FPS of the input mask frames. Values above zero map mask timestamps to the VAE's audio latent rate (25 Hz for LTX, 40 Hz for MiniMax). Zero stretches the complete mask batch to the audio latent length.
thresholdFLOAT0.500–1A mask frame is active when any pixel meets this threshold.
resize_modeCOMBOnearestNearest preserves hard frame ranges. Linear interpolates the timeline before applying the final binary threshold.
existing_mask_modeCOMBOoverwriteOverwrite replaces the audio mask, add takes the maximum, and subtract clears active regions from the existing audio mask.
layout_overrideCOMBOautoAuto prefers latent/VAE metadata, then recognizes current LTX [B,C,T,F] and MiniMax [B,C,S,T] VAEs.
audio_latent_rateFLOAT0.000–1000Audio latent steps per second. Zero resolves this from metadata or the connected VAE.
audio_vaeoptVAEAudio VAE used to resolve layout and latent rate automatically. It may be omitted when the latent carries metadata or overrides are supplied.

Outputs (1)

NameTypeDescription
audio_latentLATENT