Sampler Input Switch JK๐
Swap samplers mid-workflow on a boolean
- sampler_false
- sampler_true
- sampler_output
- boolean
Sampler choice is a workflow decision people change constantly - euler for one model, dpmpp_2m for another, a fast sampler for previews. Sampler Input Switch JK lets you flip between two SAMPLER objects on a boolean instead of editing nodes by hand. Same pattern as JakeUpgrade's other input switches, but for samplers.
How it works
boolean_value selects between sampler_true and sampler_false. True plus a connected sampler_true gives you the true sampler; anything else gives you sampler_false. As with the sibling switch nodes, the optional true input is exactly that - optional - and if it's disconnected, a true condition still falls through to the false sampler.
Where does a SAMPLER object even come from? ComfyUI's newer sampler ecosystem represents the sampler as a first-class value (from nodes like the KSampler's sampler picker, sampler-customizer nodes, or KSampler Adv-family outputs). This node routes one of those objects onward. It's the same wiring you'd use for any switch, just with the SAMPLER type.
Inputs and outputs
boolean_value- the condition.sampler_false- required, returned when the condition is false (or when true but the true input is disconnected).sampler_true- optional, returned when true and connected.sampler_output- the chosenSAMPLER.boolean- the condition passed through, so you can chain switches or gate other nodes on the same decision.
The niche use: a "fast preview" toggle that routes a cheap sampler through your main graph, then a full-quality sampler for the final render - without maintaining two near-identical branches. You still pay for both sampler paths being built upstream (ComfyUI doesn't skip unselected inputs), but you only pay the execution cost of the one that wins.
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
- A
SAMPLERis not a string. You can't type "euler" into this node. The input comes from a node that outputs the sampler type - feed the wrong type (a plain string from a text field) and the wire won't connect. This trips people coming from classic KSampler workflows. - True branch silently ignored. Same optional-input gotcha as the other switches: disconnect
sampler_trueand the node never uses it. - The sampler is only part of the recipe. A good result depends on sampler plus scheduler plus steps. This node switches only the sampler object; if your fast and slow paths need different schedulers too, you'll be switching those separately or accepting the mismatch.
If you only ever use one sampler, skip it. If you're building a workflow you share with people who swear by different samplers, this is a tidy way to let them pick without touching the graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=sampler_true, False=sampler_false) |
| sampler_false | SAMPLER | Sampler to return when condition is False | |
| sampler_trueopt | SAMPLER | Sampler to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sampler_output | SAMPLER | โ |
| boolean | BOOLEAN | โ |