Nodes/XB_ToolBox/XB-BOX - VAE分块解码(原版优化)
ComfyUI Node

XB-BOX - VAE分块解码(原版优化)

Tiling your way out of video-VAE OOM, frame by frame

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - VAE分块解码(原版优化)
  • samples
  • vae
  • IMAGE
tile0
overlap0
t_tile0
t_overlap0
cleanup不做任何清理

Video VAE decoding is where ComfyUI humbles a lot of GPUs. You sample a 14B video model fine, then the decoder tries to materialize a latent for 81+ frames at once and your card folds. XB_ROCmVAEDecodeTemporal is the XB_ToolBox answer for that specific failure: it's the "temporal" flavor of the pack's tiled VAE decoder, and it's aimed squarely at video models like Wan and LTX whose VAEs decode along the time axis as well as the spatial one.

Like every "ROCm" node in this pack, the name is legacy - the actual work is done by ComfyUI's official VAEDecodeTiled, with the wrapper translating old parameter names and adding the shared cleanup dropdown. The distinction from the plain XB_ROCmVAEDecode is the temporal axis: this one exposes t_tile and t_overlap, so you can slice the frame dimension into chunks and decode, say, 32 frames at a time with a small overlap between groups, stitching the clip back together seam-free.

Inputs that matter

  • samples - your video LATENT. Its frame count is what the temporal chunking works on.
  • vae - your video VAE (Wan 2.x, LTX, etc.).
  • tile / overlap - spatial chunking. tile 0 = wrapper picks 512.
  • t_tile / t_overlap - the interesting part: how many frames to decode per pass, and how many to overlap. Lower t_tile = less VRAM, more passes, occasionally visible flicker at chunk boundaries if t_overlap is too small.
  • cleanup - the pack's four-level memory ladder (default: none).

Output is one IMAGE tensor of all decoded frames, ready for a video combine/preview node.

How to actually use it

If a video decode OOMs, don't go straight to the nuclear cleanup options - the temporal knob is the more surgical fix. Keep tile where it was and drop t_tile until it fits. A useful rule of thumb from the wrapper: t_tile of 0 also auto-maps to a safe default (64 frames), same as the spatial tile defaulting to 512. There's also a compatibility nicety - if your ComfyUI build predates the temporal decode parameters, the wrapper detects the missing arguments and drops them instead of crashing.

The honest caveat

The seam quality of temporal chunking varies by model. Wan's 3D causal VAE is tolerant of chunked decode; some models will show subtle discontinuity at group boundaries if your t_overlap is too small. Start with overlap around 8 frames and raise it if you see it. And if you don't need the cleanup dropdown, the stock VAEDecodeTiled will do the identical job with current parameter names - this node's superpower is really just compatibility plus convenience.

Install is pack-standard: ComfyUI Manager → search XB_ToolBox, or

cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/XB_ToolBox.git

then restart. No extra pip dependencies for this one - it wraps ComfyUI core.

CategoryXB_ToolBox/原版优化

Inputs (7)

NameTypeDefaultDescription
samplesLATENT
vaeVAE
tileINT00–4096
overlapINT00–256
t_tileINT00–1024
t_overlapINT00–128
cleanupCOMBO不做任何清理4 options: 不做任何清理, 单次缓存清理, 卸载显存模型, 卸载全量模型

Outputs (1)

NameTypeDescription
IMAGEIMAGE