π± Artha Logic Gate
AND, OR, XOR and friends for your workflow's conditionals
- state
Artha Logic Gate is the π± Artha pack's Boolean combiner: two Booleans in, one Boolean out, with the operation chosen from a gate dropdown. It's the "combine these conditions" node of the Logic family - the thing that turns "the flag is on and the image is big enough" into a single decision the rest of the graph can react to.
If Compare is where conditions are computed, Gate is where they're combined. It's the same idea as the logic gates in any electronics or programming course, just rendered as a node.
How it works
The gate dropdown offers seven operations: AND, OR, XOR, NAND, NOR, XNOR, NOT. Inputs are two Booleans - a is required, b is optional and defaults to false when unwired. Every gate except NOT uses both; NOT ignores b entirely and just inverts a.
The output is a single state BOOLEAN, computed exactly as you'd expect from the gate names: AND is true only if both are, OR is true if either is, XOR is true if they differ, and the N/XN variants are the negations of those. Standard truth-table behavior, nothing exotic.
Inputs that matter
- gate - the operation, defaults to
AND. - a - required Boolean.
- b - optional Boolean, defaults to
falseif left unwired. Watch this: an unwiredbon an AND gate means the output is alwaysfalseunlessais somehow both true and... it isn't. For AND/OR to be useful, wirebup.
Output: state (BOOLEAN).
Installing it
One-pack install, same as the Artha family:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
pip install -r ComfyUI/custom_nodes/ComfyUI-Artha-Nodes/requirements.txt
restart ComfyUI, or search "ComfyUI-Artha-Nodes" in ComfyUI Manager. No API key, no models, no dependencies beyond the pack's baseline - pure Python boolean logic.
Common issues
- AND gate always outputs false:
bis unwired and defaults tofalse. Wire both inputs. - NOT gate "doesn't work": NOT only reads
a; if you fedbexpecting it to matter, it won't. - NAND/NOR/XNOR surprise people: they're the negated versions - NAND outputs false only when both inputs are true. That's the point, but it catches people who expected the gate to just mean "and".
Where you'll actually use it: gating a branch so it only runs when two conditions hold, XOR-ing two comparison results to detect a change, or inverting a flag with NOT. Paired with the pack's Compare and Basic nodes, Gate is what lets you build actual if statements into a ComfyUI graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| gate | COMBO | AND | 7 options: AND, OR, XOR, NAND, NOR, XNOR, +1 |
| a | BOOLEAN | β | |
| bopt | BOOLEAN | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| state | BOOLEAN | β |