Boolean Logic
AND/OR/XOR gates for gating your agent workflow
- bool
Agent workflows accumulate conditions fast - only send the Discord message if the file saved and the LLM flagged it important; only run the expensive tool if the user's intent classifier says yes but a rate-limit flag says no. You could handle all of that with custom Python, but comfyui_LLM_party gives you a plain logic gate instead: Boolean Logic combines two true/false values with whichever operator you pick, no code required.
How it works
It's a standard logic gate, the kind you'd find in any digital-logic course, just wired into ComfyUI's graph. Feed it one or two booleans and pick an operator, and it evaluates the result the moment the graph runs. Because the output is itself a boolean and the node is marked as an output node, it slots naturally into whatever else in your workflow is checking a condition - including other bool_logic nodes, if you need to chain several conditions together.
The inputs and outputs that matter
A- your first boolean input, required.logic_type(defaultand) - the operator:and,or,not,Nor,Nand,Xor,Xnor. This is the one field you're actually choosing per use - pickandwhen both conditions must hold,orwhen either is enough,notto simply invertA.B- optional, and only relevant for the binary operators. Leave it out entirely if you've setlogic_typetonot, since that operator only needsA.- One output:
bool- the result, ready to feed into whatever downstream logic (or another gate) needs to check a condition before proceeding.
How to install it
- ComfyUI Manager - search "comfyui_LLM_party", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then restart.
Then pip install -r requirements.txt from inside the comfyui_LLM_party folder, in your ComfyUI Python environment (python_embeded\python.exe -m pip install -r requirements.txt on portable Windows). Nothing special to configure for this node beyond the pack's baseline install - it's pure logic, no external calls or models involved.
Common issues & troubleshooting
Using not but the node wants a B. It doesn't - B is optional and the not operator ignores it entirely, evaluating purely off A. If your graph seems to be waiting on a second input you never intended to provide, double-check you actually selected not in logic_type rather than a binary operator.
Unexpected result from Nand/Nor/Xnor. These three are just the inverse of and/or/xor - if your logic feels backwards, it's worth reading the truth table for the specific operator rather than assuming a bug. Xor is true only when A and B differ; Xnor is true only when they match.
Nothing downstream ever fires. Trace back what's actually feeding A and B - a common mistake is wiring in a node whose output looks boolean-ish (like a string "true") rather than an actual BOOLEAN type, which won't evaluate the way you expect.
The pack itself won't load. Separate from this node's own simplicity, comfyui_LLM_party has a real, current install issue where nodes fail to import after a Manager install - usually a CUDA/PyTorch mismatch with no clear supported-version list. If bool_logic isn't even in your node browser, check that first.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| A | BOOLEAN | — | |
| logic_type | COMBO | and | 7 options: and, or, not, Nor, Nand, Xor, +1 |
| Bopt | BOOLEAN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |