cxToggle
A one-click on/off switch that outputs a plain INT
- INT
Every workflow ends up with a few things you flip on and off while you work: "do I want the upscaler in the loop this run?", "face detailer on or off?", "should the second prompt chain fire?" Core ComfyUI makes you type 0 or 1 into a widget for each of those. cxToggle, from the comfyui-cx_sliders pack, gives you an actual clickable switch instead.
It's about as simple as a node gets, and that's a compliment. One button on the canvas, click it and it flips state, and the current value goes out as a plain integer.
How it works
The node has a single toggle input (INT, default 0) and one INT output. The custom widget renders as a clickable button that cycles its state; the value you see is the value that travels down the wire. Click through to flip it.
One thing to note up front: the output is INT, not BOOLEAN. Out of the box it's a binary 0/1 switch, which is what you want 99% of the time, but you're not stuck with binary. In the Properties panel, min and max are configurable (the schema bounds go 0–100), so you can build a three- or four-state cycler - handy if your downstream logic distinguishes more than on/off.
What do you do with an INT out of a toggle? Anything that takes an integer:
- Feed it into a switch/select node to choose between two branches (detailer on, or passthrough).
- Connect it to a node whose input you've converted to a widget so a whole stage turns on and off in one click.
- Use it as a multiplier or mask factor somewhere, since 0 and 1 are honest numbers.
Install
cxToggle lives in the comfyui-cx_sliders pack, so the install is the same as its siblings:
cd ComfyUI/custom_nodes
git clone https://github.com/VirusShell/comfyui-cx_sliders.git comfyui_cxslider
Restart ComfyUI, or use ComfyUI Manager and search cx Sliders. No models, no Python dependencies - pure frontend widget. Needs ComfyUI 0.3.75+.
Troubleshooting
- Clicking does nothing visible - if you're seeing a plain number field rather than a button, the custom widget didn't load (usually an outdated ComfyUI or a stale browser cache). Hard-refresh after upgrading.
- You expected BOOLEAN, got INT - that's by design. If the node you're feeding insists on a boolean type, wire the toggle into a small conversion or a switch node that accepts INT; don't assume the sockets will coerce.
- Wants more than two states - raise
maxin the Properties panel and click through the states.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| toggle | INT | 00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |