π π £π § LTXV Set Audio Video Mask By Time
Time-window inpainting for LTX-2
- av_latent
- positive
- negative
- model
- vae
- audio_vae
- spatial_mask
- positive
- negative
- av_latent
- video_latent_blend_coefficients
- video_pixel_blend_coefficients
This is a temporal masking node for LTX-2's joint audio-video latents. LTX-2 generates picture and sound in one model, and sometimes you want to regenerate only part of the timeline - keep the first four seconds, redo the rest - for either stream independently. Set Audio Video Mask By Time lets you say "mask from this second to that second," on video and/or audio separately, so the sampler only reworks the window you chose. It's the building block for audio-video inpainting and extension in the LTX-2/2.3 line.
It's part of ComfyUI-LTXVideo, Lightricks' official pack. Because LTX-2's whole differentiator is synchronized audio and video, having a mask that speaks in time (and can treat the two streams differently) rather than in raw latent frames is what makes selective editing practical.
How it works
You give it the joint AV latent plus the model and both VAEs (video and audio), and a start/end time in seconds. Using the video FPS you supply, it converts that time window into the right latent frames and builds masks over the region, separately for video and audio. It also feathers the mask edges with a slope so the regenerated section blends into the kept section instead of hard-cutting. The masked latent and updated conditioning come back out ready to sample; blend coefficients come out too so downstream nodes can composite cleanly.
The inputs that matter
- av_latent - the joint audio-video latent to edit.
- model, vae, audio_vae - the LTX-2 model and the two decoders (video and audio are separate VAEs).
- start_time / end_time - the window, in seconds (defaults 0 and 10).
- video_fps - needed to map seconds to frames (default 24 - set it to your actual clip FPS).
- mask_video / mask_audio - toggle each stream on or off, so you can mask just the audio (e.g. redub) or just the video.
- slope_len - the feather length at the mask edges (default 3), for a smooth blend.
There's also mask_init_value_video/audio and an optional spatial_mask to combine time and region. Outputs: modified positive, negative, the masked av_latent, and video blend coefficients for compositing.
Installing it
ComfyUI Manager β search LTXVideo β install β restart, or cd ComfyUI/custom_nodes && git clone https://github.com/Lightricks/ComfyUI-LTXVideo and restart. It's under utility. This is LTX-2/2.3 audio-video territory, so you need the LTX-2 checkpoint, the Gemma text encoder, and the audio VAE in place.
Where people get burned
- Wrong FPS. The node converts seconds to frames using
video_fps. Set it to 24 when your clip is actually 30 (or vice versa) and your mask lands on the wrong frames - the edit shows up in the wrong place. Match it to the clip. - Forgetting a stream toggle. Want to redub audio only? Turn
mask_audioon andmask_videooff, or you'll regenerate the picture too. Mixing these up is the usual "why did my video change when I only wanted new audio." - Hard seams. If the regenerated window pops against the kept footage, raise
slope_lenfor a longer feather. - This isn't for video-only clips. It expects a joint AV latent from LTX-2. For masking a plain video latent (no audio), LTXV Set Video Latent Noise Masks is the node you want.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| av_latent | LATENT | β | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| model | MODEL | β | |
| vae | VAE | β | |
| audio_vae | VAE | β | |
| start_time | FLOAT | 0.000β2000 | β |
| end_time | FLOAT | 10.000β2000 | β |
| video_fps | FLOAT | 24.000β500 | β |
| mask_video | BOOLEAN | true | β |
| mask_audio | BOOLEAN | true | β |
| mask_init_value_video | FLOAT | 0.000β1 | β |
| mask_init_value_audio | FLOAT | 0.000β1 | β |
| slope_len | INT | 31β100 | β |
| spatial_maskopt | MASK | Spatial mask. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | β |
| negative | CONDITIONING | β |
| av_latent | LATENT | β |
| video_latent_blend_coefficients | FLOAT | β |
| video_pixel_blend_coefficients | FLOAT | β |