Nodes/comfyui-selector/Selector In (VAE)...
ComfyUI Node

Selector In (VAE)...

A per-model VAE switch

By exdysa·Created 2 years ago·Updated about a year ago· 6
Selector In (VAE)...
  • vae1
  • vae2
  • vae3
  • vae4
  • vae5
  • vae6
  • vae7
  • vae8
  • VAE
model_type1

SelInVae ("Selector In (VAE)") routes VAE objects by model type: eight VAE inputs, one model_type integer, one VAE output. It's the simplest member of the Selector In family - no lazy-loading drama, no heavy objects, just "pick the VAE that belongs to the model that's loaded." Which matters more than it sounds, because not every checkpoint wants the same VAE.

The real-world version: SDXL models ship with an SDXL VAE (and most people swap in a fixed fp16-fix VAE), while Flux uses a different VAE, and HunyuanDiT another. If your workflow mixes families, the VAE that decodes your SDXL latents isn't the one that decodes Flux latents. In practice you often grab the VAE that comes out of Load Checkpoint, and it's fine - but when you want to enforce a specific VAE per family (a tuned fp16 VAE for SDXL, the matching one for Flux, maybe a TAESD previewer for speed), SelInVae keeps the VAE lane in step with the same model_type broadcast that's switching your model, CLIP, steps and CFG.

How it works

model_type (1–8) selects vae<number>, and the winner flows out the single VAE output into your VAE Encode, VAE Decode, or VAE Decode (Tiled) for big images. It's a straight switch - the ports aren't lazy in the interesting sense, because VAEs are lightweight handles; the work they gate (encode/decode) happens in whatever node consumes the output. Cheap, predictable, and the easiest node in this pack to reason about.

Inputs & outputs that matter

  • model_type (INT, required) - the selector, fed from RecourseCkpt's MODEL_TYPE output.
  • vae1vae8 (VAE, optional) - candidate VAEs from Load Checkpoint, a dedicated VAE loader, or a TAESD preview VAE.
  • VAE output - the winner, wired to encode/decode.

Installing it

The pack standard. ComfyUI Manager → search comfyui-selector → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/exdysa/comfyui-selector

Restart and it's under Selector_Recourse/In. No requirements.txt, no model files, no network access - and notably, the pack's own README promises (and the code confirms) these nodes never touch anything outside ComfyUI, so no hidden VAE downloads are going on here.

Gotchas

  • Selected-but-empty port → None out → decode/encode just doesn't run. The usual model_type check applies.
  • A mismatched VAE (say, Flux latents into an SDXL VAE) usually doesn't crash - it produces broken, channel-mismatched garbage or a silent failure. If your multi-model workflow occasionally spits out noise after a swap, check that the VAE lane and model lane switched together.
  • It's a switcher for VAEs you supply. If you only run one family, a Reroute is all you need. Small single-author pack (GPL-3.0, quiet since early 2025), but for a multi-family graph this is one of the most useful cheap nodes in it.
CategorySelector_Recourse/In

Inputs (9)

NameTypeDefaultDescription
model_typeINT11–8
vae1optVAE
vae2optVAE
vae3optVAE
vae4optVAE
vae5optVAE
vae6optVAE
vae7optVAE
vae8optVAE

Outputs (1)

NameTypeDescription
VAEVAE