ControlAltAI: Integer Settings
A checkbox that outputs 2, because switches count from one
- setting_value
Here's the odd bit: this node takes a boolean and hands you an integer - 2 when the toggle is on, 1 when it's off. Not 1 and 0. Two and one. That looks like a mistake until you see what it's for.
It's the driver for ControlAltAI: Switch (Two Way). That switch has a selection_setting of 1 or 2 and passes input_1 or input_2 accordingly, so the pair works like a physical two-position selector: this node is the knob, the switch is the contacts. The author's own framing is exactly that - "Enable = 2, Disable = 1", used "before a two-way switch, allowing workflow logical control to flow in one or the other direction."
How it works
status = 2 if setting else 1
return (status,)
One required widget, setting, a boolean that the pack labels Enable / Disable in the UI rather than true/false. One output, an INT named setting_value. That's it - no clamping, no other ports, no maths.
The consequence you have to internalise: this is not a 0/1 boolean-to-int converter. Feed it into a node expecting a 0/1 flag and your branch will be off by one - the "off" state arrives as 1, which most truthiness checks will read as true. Use it with things that count from one, and that means essentially the ControlAltAI switch family.
Inputs and outputs
setting- required boolean widget, defaultFalse. Labels are Enable / Disable.setting_value-INT, value2when enabled,1when disabled.
Wiring it up
The one non-obvious step: setting is a widget, so you edit it by clicking, not by wiring. That's the intended flow - you queue, you flip, you queue again. If you want to drive it programmatically (from a boolean primitive, or a Boolean Basic/Reverse node), right-click the widget and convert it to an input first, then connect. The same conversion is needed on the other end: selection_setting on Switch (Two Way) is a widget too, so right-click → Convert widget to input → connect setting_value.
Read the plumbing layer of ComfyUI this way and the whole family snaps into focus: values that were baked into widgets become wires, wires get one authoritative source, and a single box at the top of the graph decides which of two branches runs.
Installing it
Part of ussoewwin/ComfyUI-NunchakuFluxLoraStacker - a pack that bundles a Nunchaku FLUX LoRA stacker, the Florence-2 captioning nodes, a TensorRT CCSR upscaler and this ControlAltAI utility set. ComfyUI Manager: search ComfyUI-NunchakuFluxLoraStacker. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ussoewwin/ComfyUI-NunchakuFluxLoraStacker.git
pip install -r requirements.txt
Restart ComfyUI. No model downloads for this node. Install the full requirements file even though a logic node needs none of it - the pack imports its CCSR dependencies (pytorch-lightning, taming-transformers, omegaconf, einops, open-clip-torch) at load time, and one missing package means none of the pack's nodes appear. The nunchaku dependency is the exception: those imports are guarded, so a machine where nunchaku won't install still loads everything else.
If something's off
The switch won't take the value. selection_setting is still a widget. Convert it to an input before you connect setting_value, or the wire will simply refuse to attach.
Your downstream node always sees "true". Check what it expects. This node emits 1 or 2; anything treating nonzero as truthy will read the disabled state as enabled. That's the cost of the 1-based design, and it's why mixing this family with 0/1-based nodes is a bad idea.
Nothing from the pack is in the menu. Import failure - read the console traceback, usually a pip package from requirements.txt. Also remember the hswq_ class prefix: this pack deliberately uses different class names from the upstream gseth/ControlAltAI-Nodes so both can be installed, so workflows referencing the original IntegerSettings class won't resolve here.
The honest verdict: as a standalone node this is a two-line curiosity. As the driver for Switch (Two Way) it's the piece that turns "which branch runs" into one checkbox, which is a real quality-of-life win on a graph with two model loaders or two post-processing paths in it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| setting | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| setting_value | INT | — |