Nodes/ComfyUI-Switti/Load Switti VAE Checkpoint
ComfyUI Node

Load Switti VAE Checkpoint

Your SD VAE will be rejected

By RyukoMatoiFan·Created 8 months ago·Updated 8 months ago· 0
Load Switti VAE Checkpoint
    • SWITTI_VAE
    vae_name
    resolution512
    strict_loadtrue
    checkpoint_path

    Every Switti image is decoded through a VQVAE - and not just a VQVAE, but Switti's own, VQVAE-Switti. This node loads it from ComfyUI/models/vae and hands it to the pipeline. The README says it plainly: standard SD VAEs are not compatible. If you've got a good vae-ft-mse lying around, leave it there - the model was trained against a specific vector-quantized codebook, and dropping in a diffusion VAE will either fail the load or produce nonsense downstream.

    What's easy to miss about Switti is that this VAE isn't a passive decode step bolted onto the end like an SD VAE after KSampler. It's load-bearing through the whole generation: the sampler predicts token ids, looks them up in the VQVAE's 4096-entry codebook to get image features at each scale, accumulates them (f_hat), and only at the very end reconstructs the actual pixels. So this node isn't loading a convenience decoder - it's loading the quantizer the autoregressive model talks to. If the core transformer is the brain, this is the mouth.

    Inputs are minimal and exactly what you'd expect:

    • vae_name - dropdown of .safetensors files in ComfyUI/models/vae.
    • resolution - 512 or 1024. Must match the resolution you picked on Load Switti Checkpoint. The pipeline builder double-checks this by comparing patch maps and raises "Switti core/VAE resolution mismatch. Load matching 512 or 1024 checkpoints." if you mixed them.
    • strict_load (default on) - same semantics as the core loader: every key must match, or flip it off to tolerate missing/unexpected keys (logged to console).
    • checkpoint_path - optional absolute path override, handy if your VAE lives somewhere ComfyUI's vae folder doesn't know about.

    The output is SWITTI_VAE, which only Build Switti Pipeline accepts - same custom-type situation as the rest of this pack. Nothing here plugs into a normal VAEDecode node.

    Installation is the pack-standard flow: ComfyUI Manager → search "ComfyUI-Switti" → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RyukoMatoiFan/ComfyUI-Switti
    

    then restart. One quirk worth knowing before you panic: the pack's dependencies live in the vendored switti/requirements.txt (transformers==4.45.2, diffusers==0.31.0, huggingface_hub==0.26.2, torchvision==0.19.1), not the pack root. If ComfyUI doesn't auto-install them and you hit import errors, pip install -r switti/requirements.txt is the fix.

    Models: download VQVAE-Switti from HuggingFace (yresearch/VQVAE-Switti) and drop the .safetensors into ComfyUI/models/vae. The reference workflow in the repo calls it switti-vqvae.safetensors. Grab it, match the resolution to your core checkpoint, and this node is one-and-done - there's genuinely nothing to tune.

    If you see "Switti VAE checkpoint not found," the file isn't in models/vae or the checkpoint_path doesn't resolve. If the builder later complains about resolution, it's this node and the core loader disagreeing. Both are easy fixes and both are probably the two most common failures in this whole pack.

    Categoryloaders

    Inputs (4)

    NameTypeDefaultDescription
    vae_nameCOMBO0 options:
    resolutionINT512512–1024
    strict_loadBOOLEANtrue
    checkpoint_pathoptSTRING

    Outputs (1)

    NameTypeDescription
    SWITTI_VAESWITTI_VAE