Nodes/Tojioo Passthrough/Any Model Switch
ComfyUI Node

Any Model Switch

Swap models without a selector widget

By Tojioo·Created 11 months ago·Updated 7 months ago· 13
Any Model Switch
  • model_1
  • model

Any Model Switch returns the first connected MODEL input by slot order and feeds it to the model output. MODEL is the big green wire - the diffusion model itself - and it's the one wire every sampler, every LoRA stack, every ControlNet needs. If you've ever kept two checkpoint loaders in one workflow to compare bases, or wanted a raw model vs. a LoRA-stacked model selectable without re-wiring, this is the node.

The pattern is the fallback switch the community knows from rgthree's Any Switch: no selector widget, first non-null input wins, so the graph picks based on what's live. Tojioo's version is typed, so it only accepts MODEL - no wildcard * socket, no chance of routing an image where a model belongs.

How it works

Start with model_1; each additional model source you connect grows another slot. On execution it collects the connected inputs that aren't None and passes through the lowest-numbered one. The None skip is what turns muting into switching: mute or bypass the branch feeding model_1 and its slot delivers None, gets skipped, and model_2 wins untouched. With no inputs at all, the node raises "no inputs connected" instead of returning nothing.

Where you'd use it

  • Checkpoint A/B. Two loaders, one sampler chain; mute the loader you're not running.
  • LoRA on/off. Raw model in model_1, LoRA-applied model in model_2, compare with a mute.
  • Fallback routing. Preferred model first, fallback second, graph decides.

Install

ComfyUI Manager → search "Tojioo Passthrough" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Tojioo/tojioo_passthrough.git

Restart ComfyUI. Nothing to download beyond the repo - no models, no pip dependencies - and it's on the Comfy Registry under publisher tojioo.

Common issues

Slot order rules: a live model_1 always beats model_2, so a "wrong" model means the earlier slot is muted, bypassed, or unwired. Two things worth noting beyond that. One, this selects a single model - if you want to merge models, that's a different tool entirely. Two, model selection by mute is all-or-nothing: bypassing the loader is the cleanest way to flip it, and since the node treats bypassed sources as missing, the fallback slot takes over exactly as designed.

CategoryTojioo Passthrough/Dynamic Nodes/Switch Nodes

Inputs (1)

NameTypeDefaultDescription
model_1optMODEL

Outputs (1)

NameTypeDescription
modelMODEL