Nodes/ComfyUI-Lightning/Load Sana VAE
ComfyUI Node

Load Sana VAE

The 32x-compression decoder behind Sana's speed

By shenduldh·Created 2 years ago·Updated about a year ago· 225
Load Sana VAE
    • VAE
    model_name
    dtypeauto

    A small node with an interesting model behind it: this loads Sana's DCAE (Deep Compression Autoencoder) VAE, which is a real part of why Sana is as fast as it is. Most diffusion VAEs compress an image by 8x per side before the diffusion model ever sees it; Sana's compresses by 32x. That's a much smaller latent space for the transformer to denoise, which is a large chunk of Sana's speed advantage over models built on the usual 8x compression.

    What it is and why you'd reach for it

    You can tell the compression factor straight from the model's own name - the README points you at mit-han-lab/dc-ae-f32c32-sana-1.0 on HuggingFace, where "f32" is the spatial downsampling factor and "c32" is the channel count of the resulting latent. That's an aggressive compression ratio compared to the standard Flux/SD VAE, and it's a deliberate design choice from the Sana paper, not an incidental corner-cut: fewer, denser latent pixels means the transformer running on top does dramatically less work per step. This node is simply what loads that decoder so you can turn Sana's latents back into pixels.

    How it works

    Reads a DCAE checkpoint off disk and prepares it to decode Sana's latents. Nothing about the mechanism is unusual beyond the VAE architecture itself being unusual - the node's job here is just loading and precision handling.

    The inputs and outputs that matter

    • model_name - a dropdown of VAE files found in models/vae. Point it at the DCAE checkpoint you downloaded.
    • dtype - auto, fp32, fp16, or bf16. auto is the sane default and lets the node pick based on your hardware; only override it if you have a specific reason (debugging a precision-related artifact, or forcing a lower-precision decode for VRAM headroom).

    Output is a VAE - wire it into whatever decodes your Sana latents, the same way you'd wire any other VAE.

    How to install it

    • ComfyUI Manager - search "ComfyUI-Lightning", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/shenduldh/ComfyUI-Lightning, then restart.

    Then download the actual VAE: get the .safetensors file from mit-han-lab/dc-ae-f32c32-sana-1.0 on HuggingFace and put it in models/vae. This is a separate download from Sana's diffusion checkpoint (that one's a .pth in models/diffusion_models) and from the Gemma text encoder - a complete Sana pipeline needs all three, each loaded by its own node in this pack.

    Common issues & troubleshooting

    model_name dropdown is empty. The DCAE .safetensors file isn't in models/vae yet, or the wrong one is there - this VAE is architecturally specific to Sana, so a standard SD/Flux VAE file won't show up as usable, and even if it loaded it wouldn't decode Sana's latents correctly given the very different compression ratio.

    Decoded images look wrong - heavy blockiness or garbled structure. That's the signature of a VAE/model mismatch: either you've loaded a non-Sana VAE by accident, or the latent coming in wasn't actually produced by a Sana diffusion pass at the matching resolution. Double check the diffusion model, VAE, and latent-image node in your graph are all part of the same Sana pipeline and not mixed with a Flux or SD graph.

    Not sure this download is worth a separate step. It is - Sana's speed story depends on this specific VAE. Swapping in a generic autoencoder isn't an option the way it sometimes is for SD-family models; the 32x compression is baked into how Sana was trained, and only this decoder understands that latent space.

    CategoryLightning/Sana

    Inputs (2)

    NameTypeDefaultDescription
    model_nameCOMBO0 options:
    dtypeCOMBOauto4 options: auto, fp32, fp16, bf16

    Outputs (1)

    NameTypeDescription
    VAEVAE