Nodes/XB_ToolBox/XB_WanVAEDecodeTiled
ComfyUI Node

XB_WanVAEDecodeTiled

Decode long Wan latents without the OOM

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB_WanVAEDecodeTiled
  • samples
  • vae
  • images
tile_size256
spatial_overlap32
temporal_chunk64
temporal_overlap8

If you've ever generated a long or high-res Wan video and watched decode eat your VRAM and die, this is the node for you. XB_WanVAEDecodeTiled is a tiled decoder for Wan video latents: it chops the latent up both spatially and across time, decodes each tile, and stitches them back. That's how a 14B Wan workflow that OOMs on a 700-frame latent can still decode on a consumer card. It's the decode counterpart to the pack's whole "spatiotemporal chunking" philosophy.

How it works

The mechanism is refreshingly honest: on NVIDIA and CPU it just hands off to ComfyUI's own VAEDecodeTiled (it even searches for it in both nodes and comfy_extras because the location moved between versions). On AMD/ROCm it does a bit more: it force-aligns the latent to a contiguous tensor first, because MIOpen chokes on the non-contiguous views that upstream operations leave behind, and if the optimized path throws it clears the cache and retries with the official decoder. The fallback behavior means a failure degrades to "still works," which is more than most tiled decoders offer.

The inputs that matter

The tooltips here are the author's own descriptions, and they're accurate:

  • tile_size (default 256) - the spatial tile size. Smaller = less VRAM, more seams.
  • spatial_overlap (default 32) - overlap between spatial tiles in pixels; this is what hides the tile boundaries.
  • temporal_chunk (default 64) - how many frames per temporal chunk. 0 means no temporal chunking, which drops you to a plain full-video decode.
  • temporal_overlap (default 8) - the frame overlap between temporal chunks. This one matters: too little temporal context and the Wan 3D VAE produces boundary artifacts (the pack's own encode code uses a proportionally generous temporal overlap because 12.5% overlap made tail frames go gray).

Output is a single images socket (IMAGE) that feeds Preview Image / Save Video.

Install

It's part of the XB_BOX pack - ComfyUI Manager search XB_ToolBox, or git clone https://github.com/WJLUOXIAO/XB_ToolBox into custom_nodes, restart. Unusually for this pack, it doesn't strictly need ComfyUI-WanVideoWrapper: it works off core ComfyUI's VAE nodes, so it can even decode latents produced by other Wan pipelines. Feed it your Wan video VAE and the latent from the sampler.

Common issues

Seam lines at tile boundaries are almost always an overlap setting too small for your content - bump spatial_overlap or temporal_overlap. If a long decode still OOMs, cut tile_size in half before touching resolution. And if you get a VAEDecodeTiled not found error, your ComfyUI core is old enough that the tiled node lives in a different module - update ComfyUI.

CategoryXB_ToolBox/Wan

Inputs (6)

NameTypeDefaultDescription
samplesLATENT
vaeVAE
tile_sizeINT25664–2048空间分块大小
spatial_overlapINT320–512空间块重叠像素
temporal_chunkINT640–1024时间分块帧数(0=不分块)
temporal_overlapINT80–256时间块重叠帧数

Outputs (1)

NameTypeDescription
imagesIMAGE