π¬ SmartVAE_StreamingDecoder (Streaming)
Decode the video your RAM was never going to hold
- samples
- vae
- audio
- preview_thumbs
- video_path
At some point you'll queue a video render whose latent alone outweighs your free RAM, and the stock decode path will just die. SmartVAE_StreamingDecoder is the pack's answer to that: it never builds the full decoded video in memory at all. Frames get decoded in small batches and written straight to an mp4 on disk, which is why the README can claim 2000+ frames on a 16 GB system without being pure fiction.
Mechanically it's the same engine as the rest of the pack, minus the color grading. frames_per_batch controls how many latent frames go into each decode call (default 8; it auto-shrinks on OOM, and if that's not enough it falls back to spatial tiling). It auto-detects the VAE's time scale so it works across LTX-Video, AnimateDiff and friends, with force_time_scale as the manual override (8 for LTX). The writer underneath is imageio-ffmpeg, which bundles the ffmpeg binary that does the encoding - and that's also why audio muxing is cheap: rather than re-encoding the video to add sound (which caused this pack's historical one-second audio offset), it stream-copies the video track and remuxes the audio in seconds, at full quality.
The inputs that matter: frames_per_batch (drop to 4 on a tight machine), fps - and the tooltip here is a genuine pro tip, it accepts fractional values and explicitly suggests wiring in the get_fps output from VHS_VideoCombine so your video matches whatever frame rate the sampler actually produced - codec (h264 for compatibility, h265 for smaller files, prores/ffv1 for pro work), audio/audio_path for the soundtrack, resume_on_crash, and ignore_warnings for corrupted latents. Outputs are preview_thumbs (an IMAGE of the last decoded frames, for live monitoring) and video_path (the STRING path to the finished file).
So when do you actually need it, as opposed to the pack's other decoders? If your clip is under a few hundred frames and you have a healthy GPU, ComfyUI's built-in VAE Decode plus a save node is fine - don't over-engineer. If you're decoding something short but want the safety rails (NaN detection, OOM recovery), UniversalSmartVAEDecode returns an IMAGE you can keep in the graph. If you're rendering a genuinely long video on a machine with limited RAM and you want a finished file with audio at the end, this is the one - it's the no-frills version, and the frills (temporal color correction) live in the Advanced decoder for when you start seeing color seams instead of OOMs.
Install the usual way: ComfyUI Manager β search "ComfyUI-Grok-SmartVAE", or:
cd ComfyUI/custom_nodes
git clone https://github.com/uczensokratesa/ComfyUI-Grok-SmartVAE.git
cd ComfyUI-Grok-SmartVAE
pip install -r requirements.txt
Restart ComfyUI and it appears under latent/video. The actual requirements are torch, numpy, imageio, imageio-ffmpeg, psutil and opencv-python - nothing exotic, no model files to fetch. Note the README is a bit ahead of the code in places (it advertises safetensors as required; the shipped code treats it as optional with a pickle fallback), but the list above is what actually installs.
Troubleshooting: black frames mean corrupted latents, not a decoder bug - check the console for a NaN warning, then shorten the render, drop CFG, or enable CPU offload in the sampler, and use ignore_warnings only to salvage an expensive run. If decode still dies on memory, set frames_per_batch to 4 and flip enable_tiling on rather than hoping the auto-recovery catches it. And as with any near-unknown solo pack, skim the repo before installing - you're running its code, and this one has effectively zero community chatter to vouch for it.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | β | |
| vae | VAE | β | |
| frames_per_batch | INT | 81β128 | Frames per decode batch. Auto-reduces on OOM. |
| overlap_framesopt | INT | 20β16 | Temporal overlap for seamless stitching. |
| force_time_scaleopt | INT | 00β16 | Manual override (0=auto). E.g., 8 for LTX-Video. |
| enable_tilingopt | BOOLEAN | false | Force tiling. Auto-enables on OOM. |
| tile_sizeopt | INT | 512256β2048 | Tile size in pixels. |
| verboseopt | BOOLEAN | false | Show detailed logs. |
| video_output_pathopt | STRING | Output path. Empty = auto-generated. | |
| fpsopt | FLOAT | 241β120 | Frame rate (fps). Supports fractional values (23.976, 29.97, etc.). Connect VHS 'get_fps' output here. |
| codecopt | COMBO | h264 | h264=compatible | h265=smaller | prores/ffv1=professional |
| audio_pathopt | STRING | Optional audio file path to mux (alternative to AUDIO input) | |
| audioopt | AUDIO | Optional AUDIO input (ComfyUI format). Priority over audio_path. | |
| resume_on_crashopt | BOOLEAN | true | Resume if crash occurred |
| ignore_warningsopt | COMBO | none | Warning handling mode: β’ none = Stop on any issue (safest) β’ minor = Continue if corruption <10% (partial black frames possible) β’ all = Force decode anyway (high risk of black frames or crash) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| preview_thumbs | IMAGE | β |
| video_path | STRING | β |