AAndBGate
A boolean AND gate for your ComfyUI graph
- input1
- input2
- BOOLEAN
The class name is LogicGateAnd but the display name in the node menu is AAndBGate, which honestly explains the node better: A and B go in, and you get True only if both A and B are truthy. Standard boolean AND, no surprises, wired up so you can build it into a graph instead of computing it in your head.
It's a small node with a real use once your graph has more than one condition to check before something should happen - "only run the upscale pass if the user enabled it and the image actually needs it," that kind of gating. On its own, AAndBGate just produces a True/False value; it doesn't stop execution by itself. To actually branch or skip work based on the result, you pair it with a switch or conditional node elsewhere in your graph (or in another pack) that reads a boolean and routes accordingly - this node computes the condition, something else acts on it.
How it works
It evaluates the truthiness of both inputs and returns input1 and input2 as a boolean - Python's normal AND semantics, so anything that evaluates as falsy (0, empty string, False) fails the gate, and anything else passes its half of it.
The inputs and outputs that matter
- input1 / input2 - both typed
*, default0. They accept anything wireable: a BOOLEAN, an INT used as a flag, a computed condition from another node. - Output - BOOLEAN,
Trueonly when both inputs are truthy.
How to install it
Part of the full LogicUtils pack. Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
then restart ComfyUI. No models, nothing to build - it's a handful of lines of Python.
Background on the pack, for context: it's written by aria1th, publicly known as AngelBottomless, the trainer behind Illustrious XL - the SDXL anime finetune that displaced Pony Diffusion v6 as the open-source default. LogicUtils is a side project, a set of small control-flow nodes he built for his own graphs, documented exactly as much as the README says: "Proper documentation is being prepared, however there are too many nodes." Nothing's changed there since the repo's last push in early 2026. It's a real, used pack regardless - it shows up as a dependency in complex published workflows next to rgthree-comfy and comfyui-kjnodes - it's just self-explanatory by node name rather than by any actual writeup, which is what this article is filling in.
Common issues & troubleshooting
The output is True when you expected False (or the reverse). Check what's actually landing in each input - a widget default of 0 reads as falsy, but a stray string like "False" (text, not a boolean) reads as truthy in Python, since any non-empty string is truthy. That mismatch is the most common way an AND gate "lies."
Nothing seems to happen when the gate outputs True. That's expected on its own - this node only computes the boolean, it doesn't branch execution. You need a separate switch/conditional node downstream that actually reads the BOOLEAN and does something with it.
Can't find a matching OR gate in this pack. This set only ships AND and Negate Value as its boolean primitives. You can build OR out of them (De Morgan's: NOT(NOT-A AND NOT-B) is OR) using Negate Value twice around an AAndBGate, or reach for a dedicated logic pack if you need a fuller gate set.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | * | 0 | — |
| input2 | * | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |