LTX2 Temporal VAE Decode
Decode long LTX-2 clips without the VRAM cliff
- samples
- vae
- IMAGE
The frustrating part of running LTX-2 on a small card isn't always the diffusion - it's the decode. Your sampler squeaks through, and then the VAE tries to decode the whole latent in one shot and the VRAM meter spikes into the red. This node decodes video latents in temporal chunks instead, so a 200-frame generation that would OOM a standard VAEDecode becomes a series of small tiles. It's the LTX2TemporalVAEDecode node from the kakachiex2/comfyui-ltx2-efficient pack, and it's basically the memory-safety net for that pack's sampler.
How it works
A LTX-2 latent comes out of the sampler as 5D - (Batch, Channels, Frames, Height, Width). The node reshapes that to a 4D frame stack, then walks through it in chunks of tile_size frames, decodes each chunk with the standard VAE path, calls torch.cuda.empty_cache() between chunks, and concatenates the results back into one IMAGE. Peak memory stays proportional to a single tile instead of the whole video.
There's a spatial_tiling toggle too, but that's a different axis: flip it on and each chunk gets decoded through ComfyUI's VAEDecodeTiled (the image-space tiling you might already know from high-res stills) instead of the plain decoder.
The inputs
samples- theLATENTfrom your sampler (this pack'sLTX2EfficientSampler, or anything else that emits a video latent).vae- your LTX-2 VAE from the loader.tile_size- frames per chunk, default 16. Lower it if you still OOM, raise it for fewer decode passes.overlap- default 0. Here's the honest part: the source code itself admits overlap blending isn't really implemented - the loop strides bytile_size - overlapand just concatenates whatever comes out, so a non-zero overlap can produce duplicate frames. Leave it at 0.temporal_tiling- on by default. Turn it off (with a small video) and it just calls the stock decoder.spatial_tiling- off by default; enablesVAEDecodeTiledper chunk.
Wiring it in
[LTX2EfficientSampler] --LATENT--> [LTX2TemporalVAEDecode] --IMAGE--> [SaveVideo]
[VAE loader] --VAE----->/
The output is a plain IMAGE batch, so it feeds any video save or preview node. The node even handles the audio-video wrapper from LTX2CombineAVLatent: if it detects a NestedTensor-style latent, it unwraps the video half and decodes that.
Installation
Install the pack once and every node in it shows up. ComfyUI Manager → search "LTX2 Efficient", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/kakachiex2/comfyui-ltx2-efficient
cd comfyui-ltx2-efficient
pip install -r requirements.txt
Then restart ComfyUI. The only dependency is pynvml (optional, used by the pack's sampler for thermal monitoring - the decode node itself doesn't need it). No model downloads; you keep loading the VAE from your existing LTX-2 setup.
Troubleshooting
- OOM even with this node - cut
tile_sizefrom 16 to 8, or enablespatial_tilingas a second lever. - Duplicate frames or doubled clip length - you set
overlapabove 0. Put it back to 0; the current code doesn't blend overlaps. - Weird images only at the end - the chunk loop breaks when a chunk covers the final frame, but frames not divisible by
tile_sizeget a short last chunk, which is normal. If the tail looks corrupt, try atile_sizethat divides your frame count evenly.
Is it the most polished node in the pack? No - the overlap handling is explicitly a "V1 simplification" in the code, and it shows. But for the one job it does - getting a long LTX-2 clip decoded on low VRAM - it's a genuinely useful stopgap, and it's the right companion to the efficient sampler.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| vae | VAE | — | |
| tile_size | INT | 161–256 | — |
| overlap | INT | 00–64 | — |
| temporal_tiling | BOOLEAN | true | — |
| spatial_tiling | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |