VAE Switch
Swap decoders to fix ugly colors without touching the model
- VAE_1
- VAE_2
- VAE
- Selection
VAE Switch routes between two VAE objects with a 1-or-2 selection. On the surface it's another boring two-slot router, but it's actually the fix for one of the most common "my images look washed out / weirdly colored" complaints in ComfyUI - so it earns its place.
Why you'd use it
The VAE is the component that converts between latent space and pixels - it encodes your source image down into the latent the model samples, and decodes the result back into something you can see. It's often the weak link. A famously bad VAE produces gray, low-saturation, smeared images even when the diffusion model itself is fine. The community fix is to swap in a known-good VAE (for SD 1.5, sd-vae-ft-mse is the classic upgrade; for SDXL, the fp16-fix variant).
VAE Switch lets you keep two VAEs loaded and flip between them - a "stock" one and your quality one - to eyeball the difference in the same workflow, or to switch decoders depending on which checkpoint's latent space you're sampling. If you've ever suspected your VAE, this node makes the A/B test a two-second toggle instead of a rewire.
How it works
Same switch family, same match:
case 1: return (VAE_1, Selection,)
case 2: return (VAE_2, Selection,)
Inputs:
- Selection - 1 or 2, an INT you can drive from anywhere.
- VAE_1 and VAE_2 - VAE objects from a VAE Loader or a checkpoint's built-in VAE.
Outputs:
- VAE - the selected VAE, into VAE Decode (or VAE Encode for img2img).
- Selection - echoed through.
Where people get burned
VAE_2 is optional - select 2 with it empty and you get a None into your decoder, which throws. Wire both.
The subtle one: a VAE must match its model's latent space. Channel count and compression are baked into the architecture, so a VAE from one model family on another produces noise or flat color rather than a subtly wrong image. Switching between two VAEs of the same architecture is a legit quality fix; switching between VAEs from different model families is how you get garbage and then blame the node. Know your latent space before you A/B.
And the usual switch caveat: both VAEs stay loaded in VRAM and both branches compute, so on a small GPU, carrying two VAEs plus everything else can cost you. A VAE is small compared to a model, but it's not free.
Installing it
ComfyUI Manager → search "HavocsCall" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HavocsCall/comfyui_HavocsCall_Custom_Nodes
Restart, and it's under HavocsCall/Switches. No requirements.txt, no downloads - the VAEs involved are ones you load yourself.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Selection | INT | 11–2 | — |
| VAE_1 | VAE | — | |
| VAE_2opt | VAE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| VAE | VAE | — |
| Selection | INT | — |