Int Input Switch JK๐
One checkbox, two integer paths โ A/B your steps, seeds, and counts without rewiring
- int_output
- boolean
When you're tuning a workflow, half the job is swapping one number for another - steps 30 vs 40, seed 12345 vs 67890, one frame count vs another. Int Input Switch JK๐ lets you put both values in the graph and flip between them with a single boolean. No more editing constants and re-running to compare.
It's part of the switch family Jake built into JakeUpgrade so his workflows stay toggleable: every CR * Input Switch JK node follows the same shape, and this is the integer flavor. If you've seen his img2mesh or Wan workflows, you've seen these switches sprinkled through the graph - that's the house style, and it's a genuinely nice way to keep A/B options in a workflow you share.
How it works
The mechanism is exactly as simple as it looks:
if int_true is not None and boolean_value:
return (int_true, boolean_value)
else:
return (int_false, boolean_value)
boolean_value- the condition.Truepicks the "true" value,Falsepicks the "false" value.int_false- required, default 0. The value returned when the condition is False.int_true- optional, default 0. The value returned when the condition is True. Leave it unplugged and the node just passesint_falsethrough regardless.
Two outputs: int_output (the chosen INT) and boolean (a pass-through of the condition, so you can keep branching downstream without re-deriving it).
One subtlety worth knowing: the source checks int_true is not None and the boolean. The INT type can't be "None" from the UI anyway (it always has a default), so in practice the boolean is the whole story - but it means an unconnected int_true behaves as a safe pass-through rather than erroring.
Where you'd actually use it
The two-number pattern is everywhere in generative workflows. Sample counts ("draft 20 steps / final 40 steps" on a master toggle), seed alternation, batch sizes, resize targets. In JakeUpgrade's image-gen workflows, switches like this gate the difference between the draft and refinement paths - the same graph, just flipped. You can also feed the boolean output into another switch to make compound conditions, which is how his big workflows layer these things without turning into spaghetti.
Install
Ships with ComfyUI-JakeUpgrade: ComfyUI Manager โ search ComfyUI-JakeUpgrade, or
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade && pip install -r requirements.txt
No models, no config. It lives in the ๐ JK/๐ Switch menu. The int range is the full 64-bit span with step 1, so there's no practical limit on what you route through it. If the whole Switch menu is missing, check the pack's config.ini - ENABLED_MODULES can exclude the switch module, though the default is to load everything.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=int_true, False=int_false) |
| int_false | INT | 0-18446744073709550000โ18446744073709550000 | Integer value to return when condition is False |
| int_trueopt | INT | 0-18446744073709550000โ18446744073709550000 | Integer value to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_output | INT | โ |
| boolean | BOOLEAN | โ |