Four Input Integer Switch
The switch for steps, seeds and sizes
- INT
Numbers need switching just as much as prompts do, and Four_Input_Int_Switch is the Endless pack's compact version. Four integer inputs, a switch selector (1-4), one INT out - wire it in front of any node that takes an integer and you can flip between presets without touching the workflow. Steps, CFG-related counts, a batch size, a fixed seed from a shortlist: all fair game.
It's the plain variant of the int-switch family (four, six, and eight inputs, plus a separate "Widget" version for each). The key design choice that separates the two families: here the integer inputs use forceInput, which means the inputs are primarily meant to be wired in from other nodes rather than typed directly. You connect four sources, then use switch to pick which one passes through.
Inputs and outputs
switch- integer 1 to 4, required. The selector.int1β¦int4- optional integers, default 0, each allowed up to 999999999999. Wire in your candidate values.
Output: a single INT - the value at the selected position, or 0 if the switch points at a position with no connected input. That fallback-to-zero behavior is worth remembering: an unconnected slot silently gives you 0 rather than erroring.
The node is registered as an output node, so it executes even with nothing downstream - fine for cases where its value feeds a console or a save path.
Why the selector isn't just "change the number"
The real payoff is reproducible switching. Instead of remembering that "run 3 was steps=28, cfg=8," you keep four presets wired up and flip switch between runs. Combined with a fixed seed elsewhere in the graph, that's a clean way to keep variables separate while you test. It also plays well with the Endless randomizers - wire their steps and seed outputs into int switch slots if you ever want to jump between "random this run" and "locked preset."
Installing it
Part of Endless πβ¨ Nodes by tusharbhutt:
cd ComfyUI/custom_nodes
git clone https://github.com/tusharbhutt/Endless-Nodes
# restart ComfyUI
Or ComfyUI Manager β search "Endless". No dependencies or model files.
Gotchas
Remember the unconnected-slot-returns-0 behavior, because a 0 steps value will do weird things to a sampler. Keep switch in 1-4. And the usual pack caveat: single hobbyist maintainer, AI-assisted, June 2025 rewrite. A switch this small is about as safe as nodes get - but if you only need one switch, a general quality-of-life pack like rgthree's will cover it without adopting this whole pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| switch | INT | 11β4 | β |
| int1opt | INT | 0 | β |
| int2opt | INT | 0 | β |
| int3opt | INT | 0 | β |
| int4opt | INT | 0 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | β |