ποΈ SmartVAE Advanced Decoder (v2.6 - Claude Clean)
Killing the color flicker at your video's chunk seams
- samples
- vae
- audio
- calibration_image
- preview_thumbs
- video_path
If you've ever decoded a long video in batches and watched the result flicker slightly - a color step every second or two that never appears in any single frame - this node exists for that exact artifact. SmartVAE Advanced Decoder is the pack's streaming decoder with temporal color correction bolted on, and it's the one you reach for when you want a long render to look like one continuous shot instead of a string of stitched chunks.
Why the flicker happens in the first place is worth understanding, because it explains the whole design. A streaming decoder processes the latent a few frames at a time to stay within VRAM. Each batch is decoded independently, and the VAE's internal statistics reset between calls - so the color of batch N+1 can drift a couple of percent from batch N, and at the seams you see a jump. The fix this pack landed on is a Reinhard-style color transfer: it matches the color statistics of the first cross_fade_frames of each batch to the tail of the previous batch, with ema_momentum smoothing how fast that running reference evolves across the whole video. Version 2.6 ("Claude Clean") is a full rework of the class, kept under the same node name so existing workflows survive the swap - always nice when a rewrite doesn't orphan your graphs.
The one setting that makes it do its thing is anti_color_bleed - it's off by default, so nothing changes until you flip it, and the tooltip is right that the cost is negligible. Then correction_strength (default 0.18) decides how hard the correction pushes: 0.10β0.15 for subtle, up to 0.25 for a strong lock. The sleeper feature is calibration_image: give it a reference image and it anchors the entire video's grade to that image's statistics, which is how you get a render that matches a specific look instead of just being internally consistent. The recommended setup is both at once - reference seeds the start, temporal matching keeps it glued together.
Everything else is the streaming decoder you'd expect from this pack: frames_per_batch (auto-reduces on OOM), fps (fractional values like 23.976 work, and it's LTX-aware via force_time_scale), codec (h264, h265, prores, ffv1), audio muxing through audio/audio_path, crash recovery via resume_on_crash, and the same three-tier ignore_warnings for corrupted latents. Outputs are preview_thumbs (an IMAGE of the last frames, for eyeballing progress in the UI) and video_path (the string path to the finished file - wire it into a text display or just read it off the console).
Install: 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
Real deps are torch, numpy, imageio, imageio-ffmpeg (that's the ffmpeg binary doing the encoding and audio muxing), psutil and opencv-python. No model files, no keys.
Troubleshooting is mostly color-parameter tuning. Still see jumps at boundaries? Raise correction_strength toward 0.25β0.30 and add a calibration image. Colors look plastic or over-corrected? Back it off to 0.10β0.15. Shots with dynamic lighting where the grade feels laggy? Drop ema_momentum toward 0.70β0.85 so the reference tracks faster. Black frames, meanwhile, are the NaN-corruption story again - check the console, shorten the video or lower CFG, and only use ignore_warnings: minor to salvage a render, not as a default. It's a solo-pack reputation to weigh, but this is genuinely the node of the three that fixes a problem the others don't even claim to.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | β | |
| vae | VAE | β | |
| frames_per_batch | INT | 81β128 | Latent frames per decode call. Auto-reduces on OOM. |
| overlap_framesopt | INT | 20β16 | Temporal overlap between batches for seamless stitching. |
| force_time_scaleopt | INT | 00β16 | Override auto-detected time scale (0=auto, 8=LTX). |
| enable_tilingopt | BOOLEAN | false | Force spatial tiling. Auto-enables on OOM. |
| tile_sizeopt | INT | 512256β2048 | β |
| video_output_pathopt | STRING | Full output path. Blank = auto-named in ComfyUI output dir. | |
| fpsopt | FLOAT | 241β120 | Frame rate. Supports fractional values (23.976, 29.97 β¦). |
| codecopt | COMBO | h264 | h264=compatible | h265=smaller | prores/ffv1=professional |
| audioopt | AUDIO | ComfyUI AUDIO dict. Takes priority over audio_path. | |
| audio_pathopt | STRING | Path to an audio file to mux into the output. | |
| anti_color_bleedopt | BOOLEAN | false | Temporal colour matching at batch boundaries. Eliminates visible colour steps in streaming decode. Safe to enable β negligible performance cost. |
| calibration_imageopt | IMAGE | Optional reference image that seeds the colour grade. When supplied, the whole video is anchored to its statistics. | |
| correction_strengthopt | FLOAT | 0.180β0.4 | Blend weight of the colour correction (0=off, 0.18=default). |
| ema_momentumopt | FLOAT | 0.930.7β0.98 | EMA decay for the running colour reference (higher=slower). |
| cross_fade_framesopt | INT | 124β24 | Number of frames at each batch boundary to colour-correct. |
| resume_on_crashopt | BOOLEAN | true | Resume from last checkpoint if a previous run crashed. |
| ignore_warningsopt | COMBO | none | none = abort on NaN/corruption | minor = continue if <10% corrupt | all = force decode (high risk of black frames) |
| verboseopt | BOOLEAN | false | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| preview_thumbs | IMAGE | β |
| video_path | STRING | β |