Nodes/was-node-suite-comfyui/Logic Comparison AND
ComfyUI Node Runs on cloud

Logic Comparison AND

WAS's boolean AND gate for its own 1/0 logic system

By WASasquatch·Created 3 years ago·Updated a day ago· 1,839
Logic Comparison AND
    • BOOLEAN
    boolean_afalse
    boolean_bfalse

    WAS Node Suite ships a whole little logic language of its own, built before ComfyUI had a native BOOLEAN socket type: values are represented as 1 (true) or 0 (false), produced by nodes like Logic Boolean, and combined with a set of gate nodes - AND, OR, XOR, NOT. This node is the AND gate: give it two of those 1/0 values and it returns true only when both inputs are true, same as AND means anywhere else in logic or programming.

    How it works

    Standard boolean AND - both inputs have to be true (1) for the result to be true; if either one is false (0), the output is false. There's no partial credit and no third state; it's a clean binary gate. Because it's built on WAS's own 1/0 convention rather than ComfyUI's native boolean, it expects inputs from other WAS logic nodes (Logic Boolean, Logic Comparison outputs, WAS's Number Input Condition, and so on) - feeding it a native BOOLEAN from a different pack may or may not connect cleanly, depending on how strict that socket's typing is.

    What it's actually for

    Gating a downstream WAS node on two conditions being true at once - say, only running a save step if both "this batch passed a quality check" and "the user enabled saving" evaluate true, where each condition is itself a WAS logic value coming from somewhere else in your graph. It's a building block for conditional branches inside a WAS-native logic chain, not something you use in isolation; the output only matters once it's wired into whatever reads that 1/0 as a condition, whether that's a WAS switch node or another logic gate one level up.

    How to install it

    ComfyUI Manager: search "WAS Node Suite," install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WASasquatch/was-node-suite-comfyui
    

    then, from inside that folder, install requirements - path/to/ComfyUI/python_embeded/python.exe -s -m pip install -r requirements.txt on portable, pip install -r requirements.txt on system Python. Restart ComfyUI; it's under WAS Suite.

    Common issues & troubleshooting

    If the AND gate doesn't seem to be working, the most common actual cause is a type mismatch rather than faulty logic - check whether the nodes feeding it are genuinely producing WAS's 1/0 convention or a native BOOLEAN. Mixing WAS's older logic nodes with newer control-flow packs in the same graph is where this trips people up; when in doubt, trace each input back to its source node and confirm it's a WAS logic output, not something from a different pack that merely looks compatible.

    This is a plain logic node with no external dependency of its own, so it's unlikely to break on its own merits. The risk that does apply is pack-wide: WAS Node Suite has had no active development since the author marked it retired in December 2023, and the recurring complaint since is the whole suite failing to import after a ComfyUI update - typically because the update quietly downgraded a shared package WAS still pins for older compatibility. If that hits you, reinstall requirements using your embedded Python interpreter specifically, not a system one - that's the fix that's actually worked for people who got stuck on it.

    CategoryWAS Suite/Logic/Boolean

    Inputs (2)

    NameTypeDefaultDescription
    boolean_aBOOLEANfalseThe first condition. Usually linked from another logic node.
    boolean_bBOOLEANfalseThe second condition, which also has to hold for a true result.

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEANTrue when both inputs are true, false if either one is false.