Sensor Switch VAE
A Two-Way VAE Switch That Knows What's Connected
- vae_true
- vae_false
- vae
Every checkpoint ships with a VAE, and for a lot of them the bundled one is mediocre. Power users keep a favorite VAE around - and, because different models want different decoders, they end up switching. This node is the two-way switch for VAE objects, with the sensor family's signature behavior: whichever input is actually connected gets routed through.
The typical setup: vae_true gets your preferred standalone VAE (the one that fixes that washed-out look), vae_false gets the checkpoint's own VAE. Flip the switch to A/B them, or bypass one branch entirely and let the sensor route the survivor. Since both inputs are optional, it also won't error out while an input is still unwired - friendlier than a stock switch during assembly.
Inputs and outputs
switch- boolean, default true.vae_true/vae_false- optional VAE inputs.vae- single VAE output.
Selection logic is the family standard: one connected input wins outright; both connected → switch on picks vae_true, off picks vae_false; neither → None instead of a crash. The output plugs straight into a VAE Encode or VAE Decode.
Why switch VAEs at all
Two honest reasons. First, the bundled-VAE problem: many checkpoints ship with a generic VAE that produces dull colors, and swapping in a community-favorite VAE is a one-node fix with a visible result - so being able to toggle it on and off to A/B test is genuinely useful. Second, model-hopping: if you switch checkpoints in one graph, the ideal VAE can differ, and a VAE switch lets you keep both wired instead of hunting through the Load VAE dropdown each time. Pair it with the pack's Sensor Switch Model and Clip for the full "swap checkpoint without touching anything else" setup.
The standard caveat
Same family rule, one more time: ComfyUI lets data pass through a bypassed node, so when both inputs are wired the sensor won't reliably auto-detect a bypass - use the switch toggle for that. Auto-detection is for genuinely disconnected inputs.
Installing it
Manager search "ComfyUI-Fossiel-QoL-Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fossiel/ComfyUI-Fossiel-QoL-Nodes
pip install -r ComfyUI-Fossiel-QoL-Nodes/requirements.txt
Restart, find Sensor Switch VAE under Fossiel/QoL. Pure routing - no models, no downloads, no dependencies beyond the pack's own requirements.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| switch | BOOLEAN | true | — |
| vae_trueopt | VAE | — | |
| vae_falseopt | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vae | VAE | — |