VAEDecodeConsistencyDecoder
OpenAI's Consistency Decoder as a VAEDecode swap
- samples
- vae
- IMAGE
The stock SD decoder is quietly the weakest link in most SD 1.5 workflows. It's a tiny CNN that reconstructs your latent in one pass, and it blurs text, softens faces, and bends straight lines - the exact things humans notice first. When OpenAI dropped the Consistency Decoder at DevDay in late 2023, they claimed a "drop-in replacement for the Stable Diffusion VAE decoder" with significant improvements in text, faces, and straight lines. VAEDecodeConsistencyDecoder is how you use that in ComfyUI: it's the decode half of the pair, swapping out the normal VAEDecode for OpenAI's beefy 2.49 GB decoder.
The name is a bit of a lie, by the way. It's not a "consistency model" in the LCM/Turbo sense - you don't set steps or CFG here. This node is a one-way trip from latent to image, and it does it with an internal distilled diffusion pass.
How it works
The Consistency Decoder is a whole diffusion model hiding inside your VAE socket. Instead of one forward pass through a small CNN, it runs a distilled reverse-diffusion process: it takes the 4-channel SD latent, scales it with the LDM 0.18215 factor, normalizes per-channel, then denoises it over 64 distilled timesteps in two schedule stages. Each stage calls a full UNet. That's why a decode that takes ~1 second with vae-ft-mse-840000-ema-pruned takes roughly 20 seconds here, and why it needs real VRAM - the model file alone is 2.49 GB and loads in full fp32.
One thing it will not do: encode. There's no encoder in this pack. In the example workflow the author encodes with a normal VAE (kl-f8-anime2.ckpt) and only uses the Consistency Decoder for the decode side. Keep your usual VAEEncode (or a stock VAELoader) on the encode path, then route the latent into this node.
The inputs and output that matter
Only two inputs, both required:
- samples (
LATENT) - the latent you'd normally feedVAEDecode. Wire this straight from your sampler orVAEEncode. - vae (
VAE) - theVAEoutput ofVAELoaderConsistencyDecoder(the loader half of this pack). This isn't a normal ComfyUI VAE object; it's a wrapper around the 2.49 GBdecoder.pt, and it only exposesdecode().
Output is a single IMAGE, ready for SaveImage or PreviewImage. Note the decode grabs only the first image in the batch - if you feed it 4 latents you get 1 image. Decode one latent at a time.
Installing it
Grab the pack the normal way, then fetch the model - the repo doesn't ship it:
cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-consistency-decoder
Restart ComfyUI, then in the ComfyUI Manager search "Consistency Decoder" and install it there if you prefer. Either way, you must drop the decoder model where the pack can see it:
cd ComfyUI/models/vae
wget https://openaipublic.azureedge.net/diff-vae/c9cebd3132dd9c42936d803e33424145a748843c8f716c0814838bdc8a2fe7cb/decoder.pt
There's no requirements.txt - the pack just uses torch, numpy, and PIL, all of which ComfyUI already depends on. The only real dependency is the model file, and forgetting it is the #1 failure mode.
Where people get burned
- SD 1.5 / 2.x latents only, not SDXL. This was trained on the SD v1/v2 latent space. Feed it SDXL latents and you'll get garbage - the two spaces aren't compatible. If you're on SDXL, this node isn't for you.
cuda:0is hardcoded in the source. No CPU, no Apple Silicon, and if your GPU isn't device 0, you'll need to patchnodes/Vae.py(there's exactly one line - change'cuda:0'to your index). This is a quick hack, not a feature.- It's slow and heavy. 20 seconds a pop is the point of diminishing returns. Try it for your hero images, not for batch exploration.
- "Better" is a vibe, not a promise. OpenAI's own release notes and the community verdict agree text and straight lines genuinely improve. Faces are more contested - some users report the Consistency Decoder makes faces worse than
vae-ft-mse. Run the same latent through both decoders and compare before you commit your whole pipeline. - VRAM. ~2.5 GB just for the model, on top of everything else in your workflow. Low-VRAM cards will feel this.
Is it worth it? For SD 1.5 prompt text, logos, and architectural lines: yes, and it's free. For casual generation: probably not - you'll trade a second of decode for twenty. The author's framing is honestly the right one: use it where the decoder was the bottleneck.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| vae | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |