Image Input Switch JK๐
A boolean-controlled fork in the road for your images
- image_false
- image_true
- image_output
- boolean
The simplest way to make a workflow do two different things is to branch on a boolean, and Image Input Switch JK is exactly that fork for images. A BOOLEAN input picks between two images, and whatever it decides comes out the other side. That's the whole mechanic, and it's shockingly useful once you realize what it enables: one workflow that can do an upscale pass or skip it, use a reference image or ignore it, feed a ControlNet map or not - without editing anything.
How it works
You give it boolean_value, an image_false, and optionally an image_true. If the boolean is true and image_true is connected, you get image_true. In every other case - false, or true with image_true left disconnected - you get image_false.
That last bit is the trap, and it's worth stating twice: if you don't connect image_true, a true value still returns image_false. The optional input doesn't default to anything; it's just not wired. Plenty of people have built a "switch" expecting the true branch to do something clever and gotten a silent passthrough.
Inputs and outputs
boolean_value- the condition. Wire this from a toggle, another switch, a comparison node, or any boolean output.image_false- required. The image returned when the condition is false.image_true- optional. The image returned when true and connected.image_output- the selectedIMAGE.boolean- passes the boolean through. This is the underrated output: it lets you chain switches, or gate a downstream node on the same condition, without re-deriving the boolean.
The classic wiring: boolean_value from a "use upscaling" toggle, image_false from your base sampler output, image_true from the upscale branch. One toggle controls whether the graph takes the fast path or the detailed path, and because switches like this are cheap, you can nest the pattern for more than two paths.
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
- The true branch never fires. 90% of the time it's the unconnected
image_truedescribed above. Check that input before anything else. - Both branches still run. A switch doesn't lazy-evaluate in ComfyUI - everything upstream of both inputs executes regardless of which one wins. If your "skip" branch is expensive, you save VRAM only by bypassing nodes, not by switching after the fact. This is ComfyUI-wide behavior, but it surprises people the first time a switch doesn't speed anything up.
- Image vs latent vs model confusion. JakeUpgrade ships the same switch pattern for
LATENT,MODEL, andSAMPLERinputs (each named<type> Input Switch JK). Grab the one whose type matches what you're switching - this one isIMAGEonly.
It's a dead-simple node with one footgun and one genuinely useful pass-through output. Once you've got a couple of toggles driving your graph, it'll feel like the most obvious thing in the world.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=image_true, False=image_false) |
| image_false | IMAGE | Image to return when condition is False | |
| image_trueopt | IMAGE | Image to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image_output | IMAGE | โ |
| boolean | BOOLEAN | โ |