Nodes/ComfyUI-Grok-SmartVAE/🎬 Universal VAE Decode (v11.3 + Ignore Warnings)
ComfyUI Node

🎬 Universal VAE Decode (v11.3 + Ignore Warnings)

Your video decode is not supposed to be the step that kills the render

By uczensokratesaΒ·Created 7 months agoΒ·Updated 4 months agoΒ· 20
🎬 Universal VAE Decode (v11.3 + Ignore Warnings)
  • samples
  • vae
  • IMAGE
β—„frames_per_batch8β–Ί
β—„overlap_frames2β–Ί
β—„force_time_scale0β–Ί
β—„enable_tilingfalseβ–Ί
β—„tile_size512β–Ί
β—„verbosefalseβ–Ί
β—„max_ram_frames500β–Ί
β—„ignore_warningsnoneβ–Ί

You just spent twenty minutes sampling 800 frames of LTX-Video, and now the stock VAE Decode node is what brings the whole run down - an out-of-memory crash, or worse, a silent wall of black frames you won't notice until you've queued twice. Universal Smart VAE Decode is the drop-in that makes that step boring.

First, the name. "Grok" doesn't mean you need an xAI key - no API calls, no tokens, nothing to configure. It's the pack's origin story: the author wrote it in a long session where several AI models (GPT, Claude, Gemini, Grok, Kimi) iterated on each other's code, and "Grok" in the title is the tribute. Cute, and irrelevant to you beyond one fact: there is nothing external to set up.

What it does is decode a video latent into a full IMAGE tensor, exactly like the built-in VAE Decode, but with the safety rails the stock node lacks. Instead of one giant decode that spikes VRAM, it works in chunks of frames_per_batch frames (default 8), stitching with a small temporal overlap_frames so the seams don't show. When a chunk blows past available VRAM it retries with a smaller batch, then falls back to spatial tiling. When you're decoding enough frames that the result would drown system RAM, it spills to disk past the max_ram_frames threshold. The "2000+ frames on 16 GB" claim in the README is aggressive, but the memory bookkeeping is real - the node checks VRAM and RAM itself instead of guessing.

Where it really earns its keep is the corruption path. Long video samplers sometimes run out of VRAM and hand back a latent full of NaN values without throwing an error; the decode then produces black frames and you blame the wrong thing. This node checks for NaN before decoding and gives you a three-tier ignore_warnings switch: none stops with a report and recommended fixes, minor pushes through when under ~10% of frames are corrupted (the bad ones come out black but the render survives), and all decodes regardless and takes the risk.

The inputs you'll actually touch: samples and vae (obviously), frames_per_batch (lower it if you keep hitting OOM - it auto-reduces anyway), force_time_scale (set 8 for LTX-Video if auto-detection ever misreads; 0 means auto), and ignore_warnings. Everything else - enable_tiling, tile_size, verbose - can sit at defaults until something hurts. The single output is IMAGE, so wire it into whatever you'd normally send a decoded video into: Save Video, VHS_VideoCombine, or a preview.

Install is the usual dance: ComfyUI Manager β†’ search "ComfyUI-Grok-SmartVAE", or clone the repo into custom_nodes and let pip handle requirements.txt:

cd ComfyUI/custom_nodes
git clone https://github.com/uczensokratesa/ComfyUI-Grok-SmartVAE.git
cd ComfyUI-Grok-SmartVAE
pip install -r requirements.txt

The real dependency list in the source is torch, numpy, imageio, imageio-ffmpeg, psutil and opencv-python - nothing heavy, no model files to download, imageio-ffmpeg just bundles an ffmpeg binary. Restart and the node appears under latent/video.

Troubleshooting: black frames are almost never this node's fault. Check the console for a NaN warning, then shorten the video, drop CFG, or enable CPU offload in the sampler. The README also flags a genuine LTX-Video 2 architectural limit where latents corrupt past roughly 1000–1200 frames - that's a model constraint, not a bug to report. And know the boundary: this node returns a tensor in memory, so for true monsters (500+ frames with audio on a small machine) the pack's streaming decoder, which writes straight to an mp4, is the better tool. For everything shorter, this is the one you want.

One honest caveat: this is a small solo pack with almost no community footprint - I couldn't find a single thread about it. Treat it like any custom node and skim the repo before installing, because it runs arbitrary Python on your machine. Reputation is thin, but the mechanism is sound, and for a fragile step like video decode that's what counts.

Categorylatent/video

Inputs (10)

NameTypeDefaultDescription
samplesLATENTβ€”
vaeVAEβ€”
frames_per_batchINT81–128Frames to decode per batch. Auto-reduces on OOM.
overlap_framesoptINT20–16Temporal overlap for seamless stitching.
force_time_scaleoptINT00–16Manual time scale override (0=auto). E.g., 8 for LTX-Video.
enable_tilingoptBOOLEANfalseForce spatial tiling. Auto-enables on OOM.
tile_sizeoptINT512256–2048Tile size in pixels for spatial tiling.
verboseoptBOOLEANfalseShow detailed progress logs.
max_ram_framesoptINT500100–10000Threshold for disk offload. Tune to system RAM: 16GB=300, 32GB=600, 64GB=1000.
ignore_warningsoptCOMBOnoneCorrupted latent handling: β€’ none = Stop on NaN/corruption (safest) β€’ minor = Try if <10% corrupt (may produce black frames) β€’ all = Force decode anyway (high crash/black frames risk)

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”