Nodes/ComfyUI ARG Toolkit/Boolean Outputter
ComfyUI Node

Boolean Outputter

Make a True/False flag actually readable

By AzelusLightvale·Created 12 months ago·Updated about 10 hours ago· 1
Boolean Outputter
    • text
    booleanfalse
    true_textTrue
    false_textFalse

    BooleanOutputter is the pack's duct tape: it takes a boolean and turns it into whichever string you want. In a cryptography and ARG workflow that's less boring than it sounds, because this pack's modern nodes output booleans all over the place - the verify variants of the KDF nodes, the constant-time compare, the hash verification nodes - and a bare True/False wire is awkward to inspect or to feed into a node that wants text. This node converts that boolean into text you control, which makes it your window into "did this verification actually pass."

    It's also genuinely useful for routing: wire a verification result in, set true_text to "good" and false_text to "bad", and the downstream string now carries meaning instead of a raw flag. Or chain a couple of them to build human-readable status lines in a big workflow. The name is a mild misnomer - it's not outputting a boolean, it's consuming one - but the intent is obvious.

    How it works

    Boring on purpose. There are three inputs: boolean (the flag), true_text (the string returned when it's true), and false_text (the string returned when it's false). The node checks the flag and returns the matching string, full stop. The code is defensive in a way that only a hobbyist project is: if the boolean is somehow neither truthy nor falsy - which shouldn't be possible - it raises a ValueError with a message that asks you to report it as a bug. It's a tiny, opinionated piece of glue.

    The inputs that matter

    • boolean - the flag to inspect. Defaults to false; wire it from any boolean-producing node (constant-time compare, KDF verify, and so on).
    • true_text - returned when the input is true. Default "True".
    • false_text - returned when the input is false. Default "False".

    Output: a single text string, whatever you set the matching branch to.

    Installing it

    It's one node in the ComfyUI ARG Toolkit pack. Install the pack via ComfyUI Manager (search "ComfyUI ARG Toolkit") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
    

    Restart ComfyUI. The pack's dependencies are the same for every node - cryptography, secretpy, stegano, invisible-watermark, reedsolo, plus transitive torch and opencv-python - and the first install takes a minute or two. No model downloads, no API keys.

    Gotchas

    There's not much to trip over here, which is the point. The one habit worth building: since the defaults are literally "True" and "False", a brand-new node tells you nothing until you set the strings. If you're debugging a verification chain, give true_text/false_text meaningful values like "PASS"/"FAIL" so a glance at the rendered text tells you the state - that's the whole reason this node exists. And if your downstream node needs a boolean, remember this turns booleans into strings, not the other way around.

    CategoryARG Toolkit/Debugging

    Inputs (3)

    NameTypeDefaultDescription
    booleanBOOLEANfalse
    true_textSTRINGTrueString returned when input boolean is true.
    false_textSTRINGFalseString returned when input boolean is false.

    Outputs (1)

    NameTypeDescription
    textSTRING