WanVideo Decode
Latents to frames, with tiling for when VRAM runs out
- vae
- samples
- images
This is the last node in the chain. The sampler gives you latents; WanVideoDecode runs them through the Wan VAE and turns them into the actual IMAGE frames you'll save as a video. Every Wan-wrapper graph ends here (or on a video-combine node after it).
Most of the time you drop it in, wire the VAE and the sampler's samples into it, and never think about it. The reason it has a pile of tiling parameters is the one situation where you do have to think about it: decoding a long or high-resolution clip can blow past your VRAM all on its own, even after the generation succeeded.
How it works
The VAE decode is the inverse of encoding - it expands the compressed latent representation back into full-resolution pixels across every frame. That's a memory-hungry operation, because at the moment of decode you're materializing the whole clip at full resolution. On a big clip, that peak can exceed what your card has, and the run dies at the finish line. Tiling fixes that by decoding the frame in overlapping tiles and stitching them, trading a little speed and a seam risk for a much lower memory ceiling.
The inputs that matter
vae- theWANVAEfrom WanVideoVAELoader. Required.samples- theLATENTfrom the sampler. Required.enable_vae_tiling- off by default. Flip it on the moment you hit an out-of-memory error during decode. This is the single most important switch on the node.tile_x/tile_y/tile_stride_x/tile_stride_y- the tile size and overlap. The defaults (272 / 272, 144 / 128) are a reasonable starting point. Smaller tiles use less memory but risk more visible seams; the strides control the overlap that blends them. Only tune these if the defaults still OOM or you see tile boundaries.
Output is a single IMAGE batch - your frames.
How to install it
Ships with the pack. Via ComfyUI Manager: search WanVideo Wrapper, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt
then restart. No separate download for this node - it uses the VAE you already loaded.
Common issues & troubleshooting
Out of memory at the very end, after generation finished. Classic. The decode is a separate memory spike from sampling. Turn on enable_vae_tiling and it'll almost always go through. If it still OOMs, shrink tile_x/tile_y.
Faint grid or seams in the output. That's the tiling. Increase the stride values (more overlap) so tiles blend, or bump tile size up if you have the memory. On short/low-res clips you can just turn tiling off entirely and decode in one pass, which has no seams by definition.
Decode is slow. Tiling adds overhead because it processes the frame in pieces. If you're not memory-constrained, leave tiling off for the fastest, cleanest decode. Tiling is a fallback for when the one-pass decode won't fit, not a default to leave on.
Colors slightly off. The normalization option (default / minmax / none) changes how latents are mapped back to pixel range. default is right for normal use; only touch it if you're chasing a specific color-matching issue.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | WANVAE | — | |
| samples | LATENT | — | |
| enable_vae_tiling | BOOLEAN | false | Drastically reduces memory use but will introduce seams at tile stride boundaries. The location and number of seams is dictated by the tile stride size. The visibility of seams can be controlled by increasing the tile size. Seams become less obvious at 1.5x stride and are barely noticeable at 2x stride size. Which is to say if you use a stride width of 160, the seams are barely noticeable with a tile width of 320. |
| tile_x | INT | 27240–2048 | Tile width in pixels. Smaller values use less VRAM but will make seams more obvious. |
| tile_y | INT | 27240–2048 | Tile height in pixels. Smaller values use less VRAM but will make seams more obvious. |
| tile_stride_x | INT | 14432–2040 | Tile stride width in pixels. Smaller values use less VRAM but will introduce more seams. |
| tile_stride_y | INT | 12832–2040 | Tile stride height in pixels. Smaller values use less VRAM but will introduce more seams. |
| normalizationopt | COMBO | 3 options: default, minmax, none |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |