Nodes/ComfyUI-SA-Nodes-QQ/Wan Decode Overlap Latent (QQ)
ComfyUI Node

Wan Decode Overlap Latent (QQ)

Decode long videos with less VRAM and no hard seams between tiles

By siraxe·Created 11 months ago·Updated 2 days ago· 72
Wan Decode Overlap Latent (QQ)
  • vae
  • samples
  • images
enable_vae_tilingfalse
tile_x272
tile_y272
tile_stride_x144
tile_stride_y128
overlap_sigma0.7
overlap_kernel_size23
normalization

VAE decode is the silent VRAM killer in video workflows. The sampler finishes fine, and then the decode - which should be the easy part - OOMs because the decoder has to hold a whole video's worth of latents and produce full-resolution frames. WanDecodeOverlapLatent is the wrapper's answer adapted into this pack: it decodes with tiling and blends the overlapping regions in time, so you get low-memory decoding without the usual tile-seam artifacts.

The mechanism is two tricks stacked. First, enable_vae_tiling splits the latent into spatial tiles (tile_x/tile_y), which is where the VRAM savings come from - the author's tooltips are unusually honest here: smaller tiles use less VRAM but make seams more obvious, and seams become "barely noticeable" around 1.5–2x stride-to-tile ratios (e.g. stride 160 with tile 320). Second, the "overlap" part handles the temporal dimension: overlap_sigma (a Gaussian blend factor, default 0.7) and overlap_kernel_size (odd number, default 23) smooth transitions between frame windows so adjacent decoded chunks blend instead of popping. That temporal blending is what makes this a step beyond a plain tile decoder - long clips stitched naively get visible flashes at window boundaries; this fades them out.

Inputs are vae (WANVAE - the Wan VAE from Kijai's wrapper) and samples (LATENT), plus the tiling/overlap knobs and an optional normalization (default or minmax). Output is images (IMAGE), ready for preview or encoding to video.

When it's worth it

  • Long clips on modest VRAM. If decode OOMs on 97+ frames, turn tiling on and find the largest tile pair that still fits. The tooltips are a genuine guide - start at the defaults (272×272 tile, ~144×128 stride) and work up.
  • Chunked pipelines. When you're stitching multiple 81-frame generations, feeding each chunk through this node with overlap blending gives a cleaner master than decoding each independently and hard-cutting.
  • It's also the natural companion to the pack's cache node: decode a cached latent set without re-sampling.

The dials that bite

  • overlap_kernel_size must be odd (the code says so; an even number will throw).
  • Smaller tile_stride = more overlap = smoother but more VRAM. If you raise tile size for fewer seams, raise stride proportionally or you'll pay for it in memory.
  • normalization is a escape hatch for color-space oddities - leave it on default unless frames look washed out.

Installing it

Part of siraxe/ComfyUI-WanVideoWrapper_QQ via ComfyUI Manager (search WanVideoWrapper_QQ/SA-Nodes-QQ), or:

cd ComfyUI/custom_nodes
git clone https://github.com/siraxe/ComfyUI-WanVideoWrapper_QQ.git

Restart ComfyUI. Needs Kijai's ComfyUI-WanVideoWrapper for the WANVAE type and Wan VAE weights.

Gotchas

  • Seams at tile boundaries are the tell-tale sign to raise tile size or lower stride - the tooltips describe exactly this tradeoff.
  • Pack note: repo renamed to ComfyUI-SA-Nodes-QQ in v1.3.4; delete any stale wanwrapper_qq folder in custom_nodes if old workflows reference it.
CategoryWanVideoWrapper

Inputs (10)

NameTypeDefaultDescription
vaeWANVAE
samplesLATENT
enable_vae_tilingBOOLEANfalseDrastically 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_xINT27240–2048Tile width in pixels. Smaller values use less VRAM but will make seams more obvious.
tile_yINT27240–2048Tile height in pixels. Smaller values use less VRAM but will make seams more obvious.
tile_stride_xINT14432–2040Tile stride width in pixels. Smaller values use less VRAM but will introduce more seams.
tile_stride_yINT12832–2040Tile stride height in pixels. Smaller values use less VRAM but will introduce more seams.
overlap_sigmaFLOAT0.70.1–5Gaussian overlap sigma for temporal blending. Higher values create smoother transitions between frames.
overlap_kernel_sizeINT233–41Kernel size for temporal overlap blending. Must be odd number.
normalizationoptCOMBO2 options: default, minmax

Outputs (1)

NameTypeDescription
imagesIMAGE