Nodes/ComfyUI-MDSNodes/Model Switch
ComfyUI Node

Model Switch

Two checkpoints, one checkbox, one workflow

By MarwanDSAI·Created 3 months ago·Updated about 15 hours ago· 3
Model Switch
  • model_a
  • model_b
  • MODEL
◄switch_ontrue►

Two MODEL inputs, a boolean, one MODEL out. It's the A/B valve for weights, and if you've ever duplicated an entire graph just to compare two checkpoints, this is the node that ends that habit.

What it's for

Two genuinely different jobs, and it's worth knowing which one you're doing.

Comparison. Same prompt, same seed, same everything, two checkpoints. Two loaders, one switch, one sampler. Flip the checkbox, run, flip back, run. Your prompt, LoRA chain and sampler settings stay identical between the two runs, which is what makes the comparison mean something - the classic way these tests go wrong is by changing the model and the graph.

Architecture switching. A base model and a refiner. An SDXL checkpoint and its lightning-distilled sibling: same prompt, 30 steps at CFG 5 or 8 steps at CFG 1.5, decided by one toggle. Or a full-quality model and a fast one for drafts, with the whole downstream branch shared.

Worth flagging before you build around this: ComfyUI already has a pile of switch nodes from core and from packs like rgthree, and this one has no magic. Two inputs, a boolean, an if-statement. Reach for it because it's in the same menu as the rest of this pack's routing nodes, not because it does anything the others can't.

How it works

Required inputs:

  • model_a - MODEL.
  • model_b - MODEL.
  • switch_on - BOOLEAN, default on, with the labels Model A (ON) and Model B (OFF) so the checkbox reads as a choice rather than an abstract true/false.

One output: MODEL. The class picks A or B and returns it. Nothing is loaded, unloaded, merged, or quantised - both inputs must already be live upstream, which means both checkpoints are in memory whether you're using them or not. That's the cost, and on a 24GB card running two SDXL-family checkpoints it's a real one.

One practical wrinkle worth mentioning because it will waste ten minutes of your life otherwise: this node is filed under the category utils/logic, not MDSNodes/... like the rest of the pack. Search by name - Model Switch - and don't go looking for it under MDSNodes in the add-node menu.

Installing it

ComfyUI-MDSNodes, by MarwanDSAI, the pack built around the author's Ultimate Model Tester workflow - which explains why a model switch exists here at all. Install through ComfyUI Manager (search ComfyUI-MDSNodes or MDSNodes) or:

cd ComfyUI/custom_nodes
git clone https://github.com/MarwanDSAI/comfyui-mdsnodes
# restart ComfyUI

No pip installs and no downloads. The repo's requirements.txt is empty and the README says the pack runs on stock ComfyUI dependencies. The checkpoints are your problem, as usual.

Common issues

Missing from search. Model Switch arrived in pack version 1.8.0 (September 2026). An older clone has the model-hub loader nodes but not this one - update in Manager and restart.

The wire won't connect to a CLIP or VAE input. Correct: it's typed MODEL, so it only feeds MODEL sockets - not CLIP, not VAE, and not CHECKPOINT_NAME strings. If you're switching whole loaders rather than latent-space weights, you want the pack's hub nodes or rgthree's Context, which bundle the triple together.

Switching it didn't change the output. Check that the sampler is downstream of this node and not of one of the loaders directly; a graph copied and rewired often has a leftover direct link. Also confirm the change actually re-ran - ComfyUI's cache is smarter than people expect, but a bypassed node on the path will silently return the other branch's model.

VRAM went up after adding it. Both models are resident. If that's a problem, switch at the loader level (two loader nodes, one bypassed) rather than switching after both have loaded.

You can't find any community notes on this node. You won't: the pack is one person's utility set and it has essentially no footprint in the community archives. When in doubt, read the class - it's nine lines and the whole behaviour is in them.

Categoryutils/logic

Inputs (3)

NameTypeDefaultDescription
model_aMODEL—
model_bMODEL—
switch_onBOOLEANtrue—

Outputs (1)

NameTypeDescription
MODELMODEL—