Integer Settings
Turn a toggle into a 1 or 2 for switch control
- setting_value
This is a tiny glue node with exactly one purpose: turn a simple on/off toggle into the number a switch wants. Enable it and it outputs 2; disable it and it outputs 1. That's the whole node. Its reason to exist is that flipping a labeled toggle is nicer than typing a raw number into a switch's selection field, especially when you're changing it every run.
On its own it does nothing interesting. In front of the pack's Switch (Two Way), it becomes the clean control surface for flipping a workflow between two paths.
How it works
There's one input, setting, which is a boolean toggle. False gives you a setting_value of 1; true gives you 2. You wire that INT output into a Two Way switch's selection_setting, and now the switch follows your toggle: off routes to input 1, on routes to input 2.
Why not just type 1 or 2 into the switch directly? You can. But a boolean toggle reads as "off/on" at a glance, it's harder to fat-finger than a number field, and it keeps the decision in a dedicated node you can label ("Use LoRA?") instead of buried in the switch. It's a small ergonomic win that adds up in a graph you run a lot.
The inputs and outputs that matter
setting- the boolean toggle. Off = 1, on = 2.setting_value- the INT (1 or 2) to feed a Two Way switch.
That's it. No other knobs.
How to install it
ComfyUI Manager → search ControlAltAI Nodes → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/gseth/ControlAltAI-Nodes
then restart. Pure logic, nothing to download.
Common issues
Nothing really breaks here. The only thing to internalize is the mapping - disable = 1, enable = 2 - because it's easy to assume "on = 1." If your switch is routing the opposite way from what you expect, that's almost always it. As the author notes, this node currently only drives two-way logic; if you need three branches, use Integer Settings Advanced with the Three Way switch instead. It's a purpose-built pairing, not a general-purpose integer node - don't expect it to do arithmetic, it's a toggle-to-selector adapter and nothing more.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| setting | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| setting_value | INT | — |