π π £π § LTXV Set Video Latent Noise Masks
Per-frame masks for video inpainting
- samples
- masks
- LATENT
This node is video inpainting's plumbing for LTX. ComfyUI's stock "Set Latent Noise Mask" attaches a single mask to a latent so the sampler only denoises the masked region - great for a still image, useless when different frames of a video need different masks. LTXV Set Video Latent Noise Masks fixes that: it takes a stack of masks and applies them across the frames of a video latent, so your inpaint region can move or change shape over time. It's what you use to paint out an object, replace a region, or regenerate part of the frame in a moving clip.
It's part of ComfyUI-LTXVideo, Lightricks' official pack. Video inpainting is fussy precisely because the mask usually can't stay still - a walking subject, a panning camera - and per-frame masks are the honest way to handle that.
How it works
You hand it a video latent and a set of masks. It attaches those masks to the latent's frames so the sampler leaves unmasked areas alone and only regenerates the masked ones. The convenience feature is graceful fallback: masks can be 2D, 3D, or 4D tensors, and if there are fewer masks than frames, the last mask is reused for the rest. So a single mask covers the whole clip (static region), while a full per-frame stack tracks a moving one - same node either way.
The inputs and outputs that matter
There are just two inputs, which is the whole appeal:
- samples - the video LATENT you're masking.
- masks - a MASK (single or a per-frame stack). Provide one to mask the same area on every frame, or a stack that changes over time to follow motion.
The single output is a LATENT with the masks attached - feed it into your LTX sampler, which then only denoises inside the masked region.
Installing it
ComfyUI Manager β Install Custom Nodes β search LTXVideo β install β restart, or cd ComfyUI/custom_nodes && git clone https://github.com/Lightricks/ComfyUI-LTXVideo and restart. It appears under latent/video. No weights of its own; you'll want the LTX checkpoint (and Gemma encoder on LTX-2) for the actual generation.
Where people get burned
- Mask count vs frame count. Fewer masks than frames means the last mask repeats - fine for a static region, wrong for a moving one, where it'll freeze the mask partway through. If your inpaint stops tracking mid-clip, you're short on masks.
- Mask resolution. The masks need to line up with the latent's spatial grid. A mask authored at the wrong resolution masks the wrong pixels - build masks against the same dimensions your video uses (divisible by 32 on LTX-2.3).
- Expecting audio masking here. This is a video-latent node. For LTX-2's joint audio-video latents and time-based windows, LTXV Set Audio Video Mask By Time is the right tool.
- Confusing it with keyframe guides. This restricts where the sampler paints; it doesn't inject a reference image. If you want to pin content into the video, that's the Add Guide family.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | β | |
| masks | MASK | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |