VAE Input Switch JK๐
The JK VAE Input Switch for A/B testing decoders
- VAE_false
- VAE_true
- vae_output
- boolean
Swapping VAEs is one of those things you do constantly and always by hand: decode a batch with the checkpoint's VAE, then re-run it with a dedicated VAE (better detail, fixed faces, a new fp16 or bf16 release) to see which one looks better. VAE Input Switch JK turns that manual re-wire into a boolean, so you can flip between two decoders without touching a cable - or, better, drive the toggle from a group-node input and let a non-technical user pick the VAE from a dropdown.
It's part of JakeUpgrade's big typed-switch family, and like the others it's a straight pass-through: boolean_value picks, VAE_false is the required default, VAE_true is the optional alternate, and you get vae_output plus a boolean pass-through so the condition can chain into another switch or a comparison.
Why you'd actually reach for it: two scenarios. First, A/B testing - wire both VAEs, flip the boolean, compare decodes, no re-plumbing. Second, workflow robustness - a shared workflow where one branch assumes a custom VAE and the other should fall back to the checkpoint's built-in. The switch means the graph doesn't break when the custom VAE isn't loaded; it just routes to the fallback.
One honest caveat: a VAE is cheap to load and ComfyUI caches it, so this is a convenience node, not a performance trick. Its real value is organizational - it keeps the "which VAE" decision visible in one place instead of buried at the loader.
Install. Ships in ComfyUI-JakeUpgrade:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Or ComfyUI Manager โ search "JakeUpgrade". Windows portable: install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt, then restart. Light deps (opencv, piexif, simpleeval, PyYAML, toml) - nothing heavy, no models to fetch.
Gotchas: the standard family traps apply - leave VAE_true unconnected and the switch silently always returns VAE_false, so connect both sides before you start flipping. If you pulled this from a JakeUpgrade workflow that reports missing nodes, check config.ini's LOAD_DEPRECATED_NODES = True (this node isn't deprecated, but that flag hides other JK nodes you might need). And the README warns ComfyUI MultiGPU can trigger CUDA errors on the latest ComfyUI - disable it if you hit weird failures.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=VAE_true, False=VAE_false) |
| VAE_false | VAE | VAE to return when condition is False | |
| VAE_trueopt | VAE | VAE to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| vae_output | VAE | โ |
| boolean | BOOLEAN | โ |