PVL BooleanLogic
A two-input AND/OR gate for your workflow, that's the whole node
- result
This is the smallest possible useful node: two booleans in, one boolean out, choose AND or OR. PVL_BooleanLogic lives in the pvlprk/comfyui-pvl-api-nodes pack and does exactly what its name says - nothing more, nothing hidden, no API, no key, no dependencies beyond the pack itself. You'd be forgiven for thinking it's trivial. It is. And once you're building workflows with conditional routing, it turns out to be exactly the kind of trivial node you keep reaching for.
The scenario: you've got a "use upscaler?" toggle and a "batch mode?" toggle, and you only want the expensive branch to run when both are on. That's an AND. Or you've got two "skip this step" signals from different condition checks, and either one should bail - that's an OR. Wiring booleans straight into a switch or a bypass can't express that; one tiny logic gate can.
How it works
bool_a and bool_b are plain boolean widgets (both default false), and logic_operator is an enum with just AND and OR (default AND). It evaluates the pair and returns result as a BOOLEAN. That's the entire mechanism - a and/or in Python, three lines. The value is in the socket, not the code: both inputs are widget-backed, so you can either click them or wire another boolean node's output into them (ComfyUI lets you connect a BOOLEAN into a widget).
Inputs and outputs
bool_a,bool_b(both required BOOLEAN).logic_operator(AND / OR).- Output:
result(BOOLEAN) -Truefor AND only when both inputs are true; for OR when either is.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes
Restart ComfyUI. No key, no network, and you can ignore the pack's heavy requirements.txt for this one.
Where people get burned
- There's no NOT / XOR / NAND. The pack's author kept this one genuinely minimal - if you need to invert a boolean, you'll want a separate not-able node or a switch. Don't go looking for a third operator in the enum; there isn't one.
- Widget-vs-socket behavior can confuse. Because the inputs are widgets, a wired boolean overrides the clicked value - so a stale click can look like the node is "ignoring" your connection. Check both.
- Booleans feeding downstream nodes need the right type. Some ComfyUI nodes expect
BOOLEANoutput and others accept it loosely; if a downstream node won't acceptresult, it's usually that node's type tolerance, not this node failing.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| bool_a | BOOLEAN | false | — |
| bool_b | BOOLEAN | false | — |
| logic_operator | COMBO | AND | 2 options: AND, OR |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |