Nodes/Consistency Decoder/VAELoaderConsistencyDecoder
ComfyUI Node

VAELoaderConsistencyDecoder

The 2.49 GB VAE you feed OpenAI's Consistency Decoder into

By shadowcz007·Created 3 years ago·Updated 2 years ago· 4
VAELoaderConsistencyDecoder
    • VAE
    vae_name

    VAELoaderConsistencyDecoder is the boring half of this pack, and that's fine - someone has to feed the beast. It's the loader for OpenAI's Consistency Decoder, the 2.49 GB decoder.pt that replaces the stock SD VAE decoder and improves text, faces, and straight lines. It doesn't decode anything itself; it hands you a VAE object you plug into VAEDecodeConsistencyDecoder, which does the actual work.

    Think of the pair as one unit: the loader exists purely so you can pick which decoder.pt to use, and the decode node exists to run it. In practice you'll add both to your graph, wire the loader's VAE output into the decode node's vae input, and then forget the loader exists. If you've already read the decode article, you know the score - this is just the drop-down half of the story.

    How it works

    The loader does two things under the hood. First, it reads the vae_name you pick and loads the file with torch.jit.load - this is a TorchScript-compiled checkpoint, not a normal safetensors VAE, and it loads in full fp32. Then it wraps the result in a thin ConsistencyDecoderWrapper that only exposes decode(). That's the whole secret: your latent space is still SD 1.5/2.x (4 channels, the 0.18215 LDM scaling), and this wrapper just knows how to run the distilled diffusion decoder over it instead of the one-pass CNN.

    Two hard facts from the source worth knowing before you wire it up:

    • cuda:0 is hardcoded. The loader pins the model to GPU 0. No CPU, no Apple Silicon, no CUDA device 1. If your setup isn't GPU 0, patch the two 'cuda:0' strings in nodes/Vae.py.
    • This is decode-only. There's no encoder, so the wrapper can't round-trip. You'll still need a normal VAE for VAEEncode. The author's example workflow does exactly that - encode with kl-f8-anime2.ckpt, decode with the Consistency Decoder.

    The input and output that matter

    Just one input:

    • vae_name (dropdown) - a list of every file in your ComfyUI/models/vae folder. You want decoder.pt. The dropdown is populated from the folder, so if it's empty, the file isn't where the loader expects it.

    Output is a single VAE - wire it into the vae input of VAEDecodeConsistencyDecoder.

    Installing it

    Same pack as its sibling, one-time cost:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shadowcz007/comfyui-consistency-decoder
    

    Or install "Consistency Decoder" from the ComfyUI Manager. Then grab the model - this is the step everyone forgets, and the pack has no installer to do it for you:

    cd ComfyUI/models/vae
    wget https://openaipublic.azureedge.net/diff-vae/c9cebd3132dd9c42936d803e33424145a748843c8f716c0814838bdc8a2fe7cb/decoder.pt
    

    It's 2.49 GB, so set a timer and walk away. No Python dependencies beyond what ComfyUI already ships.

    Where people get burned

    • The dropdown is empty. You forgot the file, or it's in the wrong folder. It must be directly in models/vae, not in a subfolder.
    • You dropped in a normal VAE instead of decoder.pt. A .safetensors SDXL VAE will load (torch.jit.load is lenient) and then decode to garbage - the latent space isn't the one this was trained on. This is an SD 1.5/2.x decoder, full stop. SDXL users: this pack is not for you.
    • VRAM. A 2.49 GB fp32 model on top of your checkpoint and sampler is real pressure on an 8 GB card. If you're tight on memory, this is the node to disable when you're just iterating on prompts.
    • Model loads every queue run. There's no caching in the loader, so expect a startup hit each time you hit Queue, plus the slow (~20 s) decode on the far side.

    It's a small, sharp tool for a specific job: getting OpenAI's decoder into your SD 1.5 graph. Load decoder.pt, wire the VAE to the decode node, and compare a hero image against your stock decoder - for text and straight lines, the difference is usually worth the wait.

    Category♾️Mixlab/consistencydecoder

    Inputs (1)

    NameTypeDefaultDescription
    vae_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    VAEVAE