Nodes/RocM Ninodes/ROCMOptimizedVAEDecodeTiled
ComfyUI Node

ROCMOptimizedVAEDecodeTiled

ROCm VAE Decode Tiled for big images and long video

By iGavroche·Created 11 months ago·Updated 4 days ago· 43
ROCMOptimizedVAEDecodeTiled
  • samples
  • vae
  • IMAGE
tile_size768
overlap96
temporal_size64
temporal_overlap8
rocm_optimizationstrue
last_frame_fixfalse

Every ComfyUI user with an AMD GPU has had the moment: the sampler finishes, the VAE decode starts, and suddenly your card is juggling a latent far bigger than it can hold. This node - the tiled variant from the ROCm Ninodes pack - is built for exactly that. It decodes big images and long videos in overlapping chunks so memory stays flat instead of spiking, with the same ROCm-aware tuning as the pack's main VAE Decode. If you regularly decode above 1024px, or you're running LTX/WAN video, this is the one you want over the stock tiled decoder - mostly because it knows about video.

How tiled decode works here

Same principle as any tiled decoder: instead of one giant decode pass, it cuts the latent into tiles with an overlap, decodes each tile, and blends the seams. The stock ComfyUI tiled decode does the spatial part of that. This node layers two things on top: ROCm-optimized tile handling (it auto-caps overlap so tiny tiles with huge overlap don't waste your VRAM, and scales tile sizes down by the VAE's spatial compression factor), and temporal support for video.

The inputs you'll actually set:

  • tile_size (default 768) - spatial tile side, 256–2048. Bigger = faster, more VRAM.
  • overlap (default 96) - seam-blend width. Raise it if you see tile boundaries.
  • temporal_size (default 64) - for video VAEs, how many frames to decode at once. This is the interesting one: it's the temporal equivalent of the tile size, and it's what keeps a 200-frame video from exploding your memory.
  • temporal_overlap (default 8) - frame overlap between temporal chunks, for smooth transitions.

Under the hood it reads the VAE's temporal compression and divides your temporal_size by it, so a setting of 64 means "64 latent frames-ish of work at a time," and it reshapes 5D video output back into a flat IMAGE tensor for you. One IMAGE output, same as the plain decode - Save Video or Preview nodes just work.

ROCm VAE Decode vs. this node

Real talk: for ordinary images the two overlap. The non-tiled ROCm VAE Decode (pack's other decode node) already tiles intelligently and has fancier precision controls plus an auto temporal-tiling mode. This node's edge is the explicit, always-on temporal control - you set the frame chunk and overlap yourself, which matters when you're pushing long LTX/WAN videos and want deterministic memory behavior rather than the auto path deciding for you. It's the "I know exactly how much memory this run will use" option.

Install

It ships in the ROCm Ninodes pack, so it's one install for the whole family - ComfyUI Manager, search "ROCm Ninodes," or:

cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/rocm-ninodes.git

Restart, and it's under ROCm Ninodes → VAE. Dependencies are the pack's usual light set (numpy, Pillow, psutil, gguf, safetensors) - no model downloads. The real prerequisite is a working ROCm PyTorch install; the README's recommended flags include TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 on Linux, and it bluntly suggests WSL2 or Linux over native Windows because the Windows ROCm/ZLUDA path is where the pack's access-violation bugs have historically lived.

Troubleshooting

See seam lines on a long video? That's the overlap-blend path that v2.2.7–2.2.9 rewrote after Windows crashes and a visible-seam bug in temporal tiling - update the pack before debugging, and check the changelog; the seam fix shipped recently. Frame count off by a few? That was also a temporal-tiling bug that's fixed in current versions. And if you're quantized (GGUF/fp8) with the rest of the pack, drop tile_size toward 512 - the README recommends more conservative tiles for quantized models to avoid OOM. The node won't crash your system if it runs out of memory, but it will remind you that tile_size exists for a reason.

CategoryROCm Ninodes/VAE

Inputs (8)

NameTypeDefaultDescription
samplesLATENTThe latent to be decoded.
vaeVAEThe VAE model used for decoding the latent.
tile_sizeINT768256–2048
overlapINT9632–512
temporal_sizeINT648–4096For video VAEs: frames to decode at once (in OUTPUT frames)
temporal_overlapINT84–4096For video VAEs: frame overlap (in OUTPUT frames). Larger values smooth causal-VAE tile transitions.
rocm_optimizationsBOOLEANtrueEnable ROCm-specific optimizations
last_frame_fixoptBOOLEANfalseRepeat the last latent frame before decode, then discard the extra output frames. Fixes end-of-video artifacts.

Outputs (1)

NameTypeDescription
IMAGEIMAGE