ComfyUI Node Runs on cloud

Boolean

One named true/false switch for the rest of your graph

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
Boolean
    • BOOLEAN
    • STRING
    valuefalse
    reversefalse

    It's exactly what it sounds like: a checkbox that outputs true or false as a node, instead of a widget buried inside some other node. The reason it's worth having on its own is wiring, not logic. Most nodes that need a boolean bury it as a hidden widget with no output, so you can't reuse that one decision anywhere else. Pull it out into its own BooleanPrimitive and you get a single named toggle you can flip once and route to several places - enabling ISNetSegment, gating a TextSwitchCase condition, feeding a comparison downstream - all from one control.

    How it works

    You set value. The node optionally flips it via reverse, and hands the result out as both a real BOOLEAN (for anything that takes one directly) and a STRING ("true"/"false", for anything that only takes text - a debug print, a filename tag, a text concatenation).

    The inputs and outputs that matter

    • value (default false) - the switch itself. This is the field you're actually toggling.
    • reverse (default false) - set true and the output is inverted. Handy when you want the on/off logic to read naturally in the UI ("enable X") but the downstream node expects the opposite sense, without adding a separate NOT node to the graph.

    Two outputs, both derived from the same underlying value:

    • BOOLEAN - wire this into any node's boolean input, like ISNetSegment's enabled.
    • STRING - the same value as text, for anywhere a boolean can't go directly.

    How to install it

    Comes with the Art Venture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sipherxyz/comfyui-art-venture
    

    Restart ComfyUI. No downloads - pure Python, loads instantly.

    Common issues & troubleshooting

    Flipped the switch and nothing changed. Confirm the BOOLEAN output is actually wired into the input you think it is - it's easy to leave a downstream node on its own default widget instead of connecting this node's output, in which case toggling BooleanPrimitive does nothing because nothing's listening to it.

    Logic reads backwards from what I expect. That's what reverse is for. Rather than mentally inverting a toggle every time you look at the graph, flip reverse once so the node's on-screen state matches what actually happens downstream.

    Getting a text node to show "true"/"false" isn't working. Use the STRING output, not BOOLEAN - text-only inputs (a label, a filename builder, a concatenation node) need the string form. Wiring the raw BOOLEAN into a string socket will either error or get silently coerced in a way you don't want.

    Is this overkill for a simple on/off? For a genuinely one-off toggle buried in a single node, sure - just use that node's own widget. This earns its place when the same decision needs to reach more than one place in the graph, or when you want a workflow's on/off switches visible and centralized rather than scattered through nested node widgets.

    CategoryArtVenture/Utils

    Inputs (2)

    NameTypeDefaultDescription
    valueBOOLEANfalse
    reverseBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    BOOLEANBOOLEAN
    STRINGSTRING