XB-BOX - VAE分块解码(原版优化)
Tiling your way out of video-VAE OOM, frame by frame
- samples
- vae
- IMAGE
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.
tile0 = 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 ift_overlapis 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| vae | VAE | — | |
| tile | INT | 00–4096 | — |
| overlap | INT | 00–256 | — |
| t_tile | INT | 00–1024 | — |
| t_overlap | INT | 00–128 | — |
| cleanup | COMBO | 不做任何清理 | 4 options: 不做任何清理, 单次缓存清理, 卸载显存模型, 卸载全量模型 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |