Nodes/ComfyUI vsLinx Nodes/Int to Bool (Threshold)
ComfyUI Node

Int to Bool (Threshold)

The one-line node that gives ComfyUI a real cutoff

By vslinx·Created about a year ago·Updated 26 days ago· 25
Int to Bool (Threshold)
    • boolean
    value0
    threshold1

    Most booleans in ComfyUI arrive ready-made: a checkbox here, a toggle there. But sometimes your branching logic is driven by a number - how many images a loader found, a batch index, a counter you're incrementing - and ComfyUI won't let you wire an INT into a boolean socket. That's the whole job of Int to Bool (Threshold). It's about as simple as a node gets, and it exists so the rest of the vsLinx boolean family has something to chew on.

    The mechanism is literally one comparison: the node outputs True when value >= threshold, otherwise False. The source is a single return (value >= threshold,). Nothing hidden, no API calls, no models - this is the rare custom node you can read top to bottom in a minute.

    The inputs that matter

    Just two, and both are INT:

    • value (default 0) - the integer you're testing.
    • threshold (default 1) - the cutoff. With the default, it behaves like the classic "0 → False, anything ≥ 1 → True" conversion everyone expects from an int-to-bool.

    The output is a single boolean that wires into any boolean input. Its natural home is the Forward/Bypass on Boolean (Any) or Forward/Mute on Boolean (Any) node from the same pack - feed your converted boolean into one of those and you get a conditional branch in your graph without touching the queue. Chain it through the pack's Boolean AND/OR/Flip nodes and you can build "if this count is at least 3 AND that other condition is true, mute this block" logic. The same pattern (boolean-driven group control) is why rgthree's Fast Groups Bypasser exists; vsLinx just does it per-wire with any source of truth.

    Where people get burned

    The input is INT only. If your number is a FLOAT - CFG, denoise, an aspect ratio - you can't wire it straight in; you'll need a conversion node first. And the comparison is >=, not ==. There's no "exactly equals" variant here, so if you need equality checking, this node won't do it - reach for a logic utility from another pack.

    Installing it

    It ships in ComfyUI vsLinx Nodes, a utility pack with no requirements.txt and no model downloads - pure Python, so install is painless. Via ComfyUI Manager, search "vsLinx" and hit install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/vslinx/ComfyUI-vslinx-nodes.git comfyui-vslinx-nodes
    

    Then restart ComfyUI and look for it under the vsLinx/boolean category.

    Honest take: this node is a rounding utility, not a feature. You won't go looking for it until some workflow hands you an integer where a condition belongs - and then you'll be glad it's there. Since it costs nothing and the rest of the pack (the forward/bypass nodes, Load Last Generated Image, the tiled samplers) earns its place, it's not a reason to install vsLinx - but it's a nice reason to keep it once you have.

    CategoryvsLinx/boolean

    Inputs (2)

    NameTypeDefaultDescription
    valueINT0
    thresholdINT1

    Outputs (1)

    NameTypeDescription
    booleanBOOLEAN