Rikan Wan Spatio-Temporal Tiled VAE Decode
A VAE decoder that tiles in space *and* time
- vae
- latents
- image
If you've generated a long or high-res Wan clip, you've met the wall: the KSampler finishes, the latent is gorgeous, and then the stock VAEDecode eats your VRAM and dies on the last step. It's such a common failure that the standard advice in every Wan thread is "swap in the tiled VAE decode." This node is that, done properly - it tiles the decode in both spatial dimensions and across time, so instead of one giant decode you get a grid of small ones that fit in the card you actually have.
What makes it more than ComfyUI's built-in VAEDecodeTiled is the temporal half. The built-in node handles spatial tiling fine, but a long clip is a big 3D tensor, and the memory pressure comes as much from the frame count as the resolution. This decoder splits the latent into temporal chunks too, decodes each chunk, and blends the chunk boundaries back together with weighted ramps so you don't see cut lines scrolling through your video.
The inputs
vaeandlatents- standard.- spatial_tiles (default 4) - how many tiles per spatial dimension (so 4 = 16 tiles per frame). Fewer tiles = more VRAM, less seam risk; more = the opposite.
- spatial_overlap (default 4) - overlap between spatial tiles, in latent pixels, blended with linear ramps.
- temporal_tile_length (default 16) - frames per temporal chunk. This is your main VRAM lever for long clips.
- temporal_overlap (default 4) - frames of overlap between temporal chunks, cross-faded.
Output: a single image tensor, all frames reassembled and ready for the video save node.
How it avoids seams
It's the classic weighted-average approach. Each spatial tile is decoded, its overlap edges are tapered with linear fade weights, and all tiles are summed and normalized by the accumulated weights - so overlapping regions blend instead of hard-overlapping. The temporal boundary does the same thing in the frame dimension with its own cross-fade weights. A nice touch: it probes the VAE's actual scale factors by decoding a tiny dummy latent at startup, so it adapts to whatever VAE you plugged in rather than hard-coding Wan numbers - despite the name, it tolerates other 5D-latent video VAEs. And it empties the CUDA cache when it's done.
Where people get burned
- Overlap of 0 will give you seams. It's allowed by the schema (min 0), but with no blending region the tile edges are visible. Keep at least 1, more if you see lines.
- Tiling is slow. You're doing N×M small decodes plus blending instead of one big one. A 4×4 spatial grid on a long clip is noticeably slower than a clean decode on a card with room to spare. This node is for when the alternative is nothing.
- It's a decode-side fix only. If the OOM happens during encode or sampling, this won't help - see the pack's tiled-VAE I2V Painter variant for the encode side.
Install: ComfyUI Manager → search Rikannodes, or git clone https://github.com/rikanrino/Rikannodes into custom_nodes, pip install -r Rikannodes/requirements.txt, restart. It's under the Rikannodes category. The pack is young and the README is just a node list, so read the defaults as starting points - on a 24GB card you can likely just use the stock decoder and skip this entirely.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| latents | LATENT | — | |
| spatial_tiles | INT | 41–8 | — |
| spatial_overlap | INT | 40–8 | — |
| temporal_tile_length | INT | 162–1000 | — |
| temporal_overlap | INT | 40–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |