ComfyUI Node
🅛🅣🅧 Stitch AV Latents
Stitches two AV latents in two video modes: bridge insertion or linear overlap replacement. Audio stitching always keeps bridge behavior. vae/audio_vae optional (defaults: stride 8, ~25 audio latents/s). Time-based audio mask indices are clamped to actual latent length.
🅛🅣🅧 Stitch AV Latents
- av_latent_1
- av_latent_2
- model
- vae
- audio_vae
- av_latent
◄video_fps24.0►
◄bridge_latent_frames1►
◄stitch_modebridge►
◄overlap_latent_frames16►
◄video_pre_frames0►
◄video_post_frames0►
◄video_slope_len0►
◄mask_videotrue►
◄video_mask_init_value0.0►
◄audio_start_time0.0►
◄audio_end_time10.0►
◄audio_slope_len3►
◄mask_audiotrue►
◄audio_mask_init_value0.0►
◄audio_mask_bridge_onlyfalse►
◄bridge_init_modelerp►
Categorylightricks/LTXV
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| av_latent_1 | LATENT | — | |
| av_latent_2 | LATENT | — | |
| model | MODEL | — | |
| video_fps | FLOAT | 24.00–500 | Decoded video FPS. Each video latent step spans (temporal_stride / fps) seconds; optional vae/audio_vae override stride and audio rate. |
| bridge_latent_frames | INT | 11–4096 | Bridge length in video latent frames when stitch_mode='bridge'. In stitch_mode='overlap_linear_video' it does not affect video; it only controls audio bridge duration. |
| stitch_mode | COMBO | bridge | How to stitch video latents: 'bridge' inserts transition latents between clips (existing behavior); 'overlap_linear_video' linearly blends overlapping tail/head and replaces overlap. Audio always uses bridge stitching. |
| overlap_latent_frames | INT | 161–4096 | Overlap size for stitch_mode='overlap_linear_video', in video latent frames. Ignored when stitch_mode='bridge'. |
| video_pre_frames | INT | 00–4096 | Video mask expansion before the transition region, in latent frames (used when mask_video=True). |
| video_post_frames | INT | 00–4096 | Video mask expansion after the transition region, in latent frames (used when mask_video=True). |
| video_slope_len | INT | 00–100 | Video mask slope length around the transition window, in latent frames (used when mask_video=True). |
| mask_video | BOOLEAN | true | — |
| video_mask_init_value | FLOAT | 0.00–1 | — |
| audio_start_time | FLOAT | 0.00–2000 | Audio mask start time in seconds (used when mask_audio=True). |
| audio_end_time | FLOAT | 10.00–2000 | Audio mask end time in seconds (used when mask_audio=True). |
| audio_slope_len | INT | 31–100 | Audio mask slope length in latent frames (used when mask_audio=True). |
| mask_audio | BOOLEAN | true | — |
| audio_mask_init_value | FLOAT | 0.00–1 | — |
| audio_mask_bridge_only | BOOLEAN | false | If enabled, ignore audio_start_time/audio_end_time and mask exactly the inserted audio bridge so only bridge audio is denoised. audio_slope_len is applied inside the bridge and never bleeds into clip 1 / clip 2 audio. |
| bridge_init_mode | COMBO | lerp | How to initialize bridge latents. For video this is used only when stitch_mode='bridge'. In stitch_mode='overlap_linear_video' it affects only audio bridge initialization. 'lerp': linear interpolation between endpoints (original). 'noise': random gaussian noise (model generates from scratch). 'zeros': zero-filled (neutral latent). |
| vaeopt | VAE | If set, video temporal stride = downscale_index_formula[0]. If omitted, uses default 8 (LTX-2). | |
| audio_vaeopt | VAE | If set, audio latent steps/sec from the VAE. If omitted, uses ~25 (LTX-2). Wire both for exact sync if your VAE differs. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| av_latent | LATENT | — |