Boolean Toggle
The two-dollar light switch for ComfyUI workflows
- toggle_value
Boolean Toggle is the simplest node in Skycoder Tools, and honestly one of the simplest in all of ComfyUI: one checkbox, one output, zero magic. You click it on or off and it hands that true/false straight to whatever you wire it into. That's the whole job - but "a boolean you can see on the canvas" turns out to be a genuinely useful thing to have.
The reason you'd reach for it is conditional branching. ComfyUI's stock graph doesn't give you a lot of native if/then muscle, so a manual toggle is how people gate behavior: "do I do a second pass this run?", "feed this prompt or that one?", "should the workflow stop and let me check something". Pair the output with a switch node (Impact Pack's switches are the standard here, or rgthree's) and you get a workflow you can flip between two modes without rebuilding anything. A checkbox you can see at a glance beats a hidden primitive value every time when you're re-running the same graph a dozen times.
How it works
It's a pass-through, in the most literal sense. The node reads the toggle input and returns it unchanged:
def toggle_func(self, toggle):
return (toggle,)
There's no state, no memory, no side effects. When you tick it, the output is True; untick it, False.
Inputs and outputs
Only one of each, so there's not much to get wrong:
toggle(BOOLEAN, defaultfalse) - the checkbox you flip.toggle_value(BOOLEAN) - the output. Wire it into a switch's select input, a boolean input on another custom node, or anything that takes aBOOLEANsocket.
Installing it
This node ships inside Skycoder Tools, so you install the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/skycoder182/comfyui-skycoder-tools.git
# then restart ComfyUI
Or, easier, open ComfyUI Manager → "Install Custom Nodes" → search "Skycoder Tools" → Install → restart. No model downloads, no extra Python dependencies - the pack only needs Pillow, torch and numpy, which ComfyUI already ships.
One honest caveat, since this pack has essentially no community footprint (I found zero mentions of it on the usual subreddits): it's a small unknown author's collection. The good news is the code is tiny and readable, so if you're the cautious type - and after the ecosystem's history of malicious node packs, you should be - skim it before you trust it. This particular node is about three lines you can read in ten seconds.
Common issues
There aren't really any. The only way to get burned is to expect more than it offers: it doesn't toggle a value, it toggles a boolean. If you want to switch between two prompts or two models, you still need a switch node on the receiving end. And if it ever looks like nothing's happening, check you actually wired toggle_value somewhere - a dangling boolean output is a silent no-op.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| toggle | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| toggle_value | BOOLEAN | — |