Nodes/RocM Ninodes/ROCm VAE Decode
ComfyUI Node

ROCm VAE Decode

The decode node this pack is really about

By iGavroche·Created 11 months ago·Updated a day ago· 43
ROCm VAE Decode
  • samples
  • vae
  • IMAGE
tile_size768
overlap96
use_rocm_optimizationstrue
precision_modeauto
batch_optimizationtrue
compatibility_modefalse
enable_temporal_tilingauto
temporal_chunk_size16
temporal_overlap2
last_frame_fixfalse

ROCm VAE Decode is the node this whole pack exists for. Where most of the pack's sampler nodes are honest reskins, this one does real work: it detects what kind of VAE you've handed it, picks precision and tiling to fit, and - the hard part - decodes long LTX and WAN videos without running out of memory or leaving seams between temporal chunks. It's the most-tested, most-patched node in the pack, and it shows.

It's in ROCm Ninodes/VAE and drops in where VAE Decode goes: LATENT in from your sampler, VAE in from your loader, IMAGE out to Save/Preview.

How it works

On stills it behaves like an optimized, tile-aware VAE Decode: it detects your GPU architecture, picks a sensible precision (fp16 is the default on AMD), and decodes either directly or in tiles depending on size. The interesting behavior shows up with video. It sniffs the latent shape - 5D means video - then classifies the VAE: standard, WAN, LTX (128 channels, 32× spatial compression), or pixel-space passthrough for things like z-image where no VAE decode is needed at all. LTX and WAN get causal handling: the model weights stay in native precision because fp16 accumulation drifts and produces banding, while the input runs fp16 for memory.

The genuinely clever part is temporal tiling. A long video's decode output can exceed 3 GB, which is where APUs and midrange cards start dying. Set enable_temporal_tiling to "enable" (or leave "auto" and it kicks in past the 3 GB threshold) and the node decodes the video in overlapping chunks along the time axis, dropping the incomplete first frame of each chunk and linearly blending the overlap into the cumulative result - the exact fix for the visible-seam bug this pack spent several releases on. The output frame count comes out identical to a full decode.

The inputs that matter

  • samples / vae - the latent and the VAE. Everything else is tunable.
  • tile_size (768) / overlap (96) - spatial tiling for big stills. Larger tile = faster but hungrier; overlap reduces tile-edge artifacts.
  • precision_mode (auto/fp32/fp16/bf16) - "auto" is right on AMD; fp16 default is the memory win.
  • enable_temporal_tiling (auto) - the video knob. Force "enable" for long LTX/WAN jobs.
  • temporal_chunk_size (16) - latent frames per chunk; 16 latent ≈ 121 output frames for LTX.
  • temporal_overlap (2) - latent frames of blend between chunks; higher = smoother but more overhead.
  • last_frame_fix - repeats the final latent frame before decode and trims the extras, fixing end-of-video artifacts on causal VAEs. Turn it on if the last frames look wrong.

Output is IMAGE, straight to Save Video/Preview.

Installing it

Part of ROCm Ninodes - ComfyUI Manager, search rocm-ninodes, or:

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

then restart. v1.x installs run uv run python tools/upgrade_to_v2.py once. Dependencies are light (numpy, Pillow, psutil, gguf, safetensors); the real requirement is a ROCm PyTorch build. Update to at least v2.2.8 if you're on Windows - earlier versions hit a memmove access violation on LTX decode under the ZLUDA backend.

The honest version

This is the node to reach for if you do video on an AMD card: the temporal tiling, the causal-chain handling, and the seam fixes are the real deal, and they're exactly the things stock VAE Decode doesn't manage gracefully on ROCm. For plain 1024×1024 Flux stills on a beefy card, the difference over stock is modest - but it won't hurt, and on a unified-memory APU the fp16 default is worth having.

CategoryROCm Ninodes/VAE

Inputs (12)

NameTypeDefaultDescription
samplesLATENTThe latent to be decoded.
vaeVAEThe VAE model used for decoding the latent.
tile_sizeINT768256–2048Tile size. Larger values use more VRAM but are faster.
overlapINT9632–512Overlap between tiles. Higher values reduce artifacts but use more VRAM.
use_rocm_optimizationsBOOLEANtrueEnable ROCm-specific optimizations for AMD GPUs
precision_modeCOMBOautoPrecision mode. 'auto' selects optimal for your GPU.
batch_optimizationBOOLEANtrueEnable batch processing optimizations
compatibility_modeoptBOOLEANfalseEnable stock ComfyUI compatibility mode (disables all ROCm optimizations)
enable_temporal_tilingoptCOMBOautoFor LTX/WAN videos: 'auto' enables temporal tiling for large outputs, 'enable' forces it on, 'disable' turns it off.
temporal_chunk_sizeoptINT164–256Temporal tile size in LATENT frames. 16 latent = ~121 output frames for LTX.
temporal_overlapoptINT21–8Overlap in LATENT frames between temporal tiles. Higher = smoother but more overhead.
last_frame_fixoptBOOLEANfalseRepeat last latent frame before decode, then discard extra output frames. Fixes end artifacts.

Outputs (1)

NameTypeDescription
IMAGEIMAGE