Model Input Switch JK๐
Switch checkpoints and models on a boolean, cleanly
- model_false
- model_true
- model_output
- boolean
Model Input Switch JK is the model-flavored entry in JakeUpgrade's switch family: a BOOLEAN routes one of two MODEL objects to the output. Same idea as the image and latent switches, but for the big, heavy object at the top of your graph.
How it works
boolean_value picks between model_true and model_false. True plus a connected model_true returns the true model; otherwise you get model_false. The recurring family gotcha applies verbatim: leave model_true disconnected and the true condition just falls through to the false model.
The interesting bit about switching models is that ComfyUI is actually decent at this one - unlike latents, where the unselected branch still fully executes, the model picker is often a genuine convenience. You can wire two different checkpoints (or a checkpoint and a merged/GGUF model) into one node and toggle between them for an A/B style comparison without maintaining two sampler branches. Downstream nodes only see the winning model.
Inputs and outputs
boolean_value- the condition.model_false- required, returned when false (or when true with the true input unconnected).model_true- optional, returned when true and connected.model_output- the chosenMODEL.boolean- the condition passed through for chaining.
Installing it
Ships in ComfyUI-JakeUpgrade:
- ComfyUI Manager โ search "JakeUpgrade" โ install โ restart.
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Windows portable: run install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt.
Common issues
- It switches the model, not the whole pipeline. Your CLIP and VAE are separate objects. Swap the model but leave the old CLIP wired and you can end up with a mismatched pair (a Flux model with an SDXL CLIP does not go well). Switch CLIP alongside the model - there's a
CLIP-input version of this pattern elsewhere in the ecosystem for exactly that reason. - True branch silently ignored - the unconnected-
model_truetrap, same as its siblings. - Model in VRAM isn't automatically freed. ComfyUI's model management handles swapping, but if you're switching between two multi-GB models you'll feel the load/unload churn on every toggle. It works; it's just not free.
If you never swap base models mid-session, this node has nothing to do for you. If you're building a "try both checkpoints" workflow to hand to a friend, it's the clean way to put the choice in a toggle instead of a rebuild.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=model_true, False=model_false) |
| model_false | MODEL | Model to return when condition is False | |
| model_trueopt | MODEL | Model to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model_output | MODEL | โ |
| boolean | BOOLEAN | โ |