LTX Set Audio Latent Binary Masks
Put silence (or sound) exactly where you want it in LTX's audio latent
- audio_latent
- masks
- audio_latent
LTX-2 and 2.3 do something no other open-weights video model does: they generate the video and the soundtrack in one pass. That audio lives in its own latent space, with its own noise_mask - the same trick ComfyUI uses to tell a video sampler "regenerate here, leave the rest alone," but for sound. LTX Set Audio Latent Binary Masks is the node that builds that audio noise mask from a mask you can actually see, so you get to decide which moments of the soundtrack get regenerated and which get pinned down.
That is audio inpainting, and it's the honest reason this node exists. vlo (the video editor these nodes ship for) uses it in its default workflows to scrub bad sounds, add foley where the action is, or hold a voice track steady while the picture changes. If you're hand-building an LTX-2 audio+video pipeline, it's the missing piece between "mask drawn on the timeline" and "audio latent with a noise mask."
How it works
The clever part is what it throws away. Feed it a binary mask image or mask video, and each frame is reduced to a single active/inactive value: if any pixel in the frame meets the threshold (default 0.5), that frame counts as active. The spatial shape of your mask is deliberately ignored - an audio latent has no spatial dimensions to map it onto, so only the temporal extent matters.
That one-pixel-tall timeline is then resized along time to match the audio latent's frame count, re-thresholded to hard 0/1, and broadcast across the whole latent. What comes out is a binary mask that says "denoise this temporal chunk, hold this one."
The inputs that actually matter:
- audio_latent - the LTX audio latent whose
noise_maskyou're setting. - masks - your mask image or mask video. More frames = finer control over the timeline.
- threshold (default 0.5) - how bright a pixel must be to mark its frame active.
- resize_mode (default
nearest) -nearestkeeps hard ranges,linearsmooths transitions before the final 0.5 cut. For crisp on/off silence, keepnearest. - existing_mask_mode (default
overwrite) -addtakes the max with an existing mask,subtractclears the masked regions out of it.
One output: the same audio_latent, now carrying the noise_mask. Wire it straight into the sampler the same way you'd wire any latent with a mask.
The gotchas
This is a temporal node, so a single still mask image activates the entire clip (or none of it) - you need one mask frame per audio moment you care about. If the audio latent isn't a 4D [B, C, F, S] tensor you'll get a clear error; that shape is exactly what LTX's audio encoders produce, so if you're feeding a video latent in by mistake, that's your warning. And remember subtract clears regions - it's for carving holes out of an existing mask, not layering one on.
Install
It ships in the ComfyUI-vlo pack, so it installs with the rest of them:
cd ComfyUI/custom_nodes
git clone https://github.com/PxTicks/ComfyUI-vlo.git
Restart ComfyUI (or hit refresh in ComfyUI Manager, which can install it as "ComfyUI-vlo"). No models to download, nothing extra to pip install - recent ComfyUI already bundles the video stack this leans on.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_latent | LATENT | Audio latent whose noise_mask will be set. | |
| masks | MASK | Binary mask image or mask video. Only the temporal activity of each frame is used; spatial dimensions are ignored after thresholding. | |
| threshold | FLOAT | 0.500–1 | Per-pixel threshold used when deciding whether a mask frame is active. If any pixel in a frame meets this threshold, that frame activates audio masking. |
| resize_mode | COMBO | nearest | How to resize the derived binary timeline to the audio latent length. 'nearest' preserves hard ranges; 'linear' smooths transitions before the final binary threshold. |
| existing_mask_mode | COMBO | overwrite | How to combine with an existing audio noise mask. 'overwrite' replaces it, 'add' takes the max, and 'subtract' clears masked regions. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio_latent | LATENT | — |