ABiggerThanB
The lightweight two-number comparison people actually recommend
- input1
- input2
- BOOLEAN
If you've ever gone looking for a ComfyUI node that just answers "is A bigger than B," you've probably run into the same problem the rest of the pack exists to solve: the obvious options are either broken, unmaintained, or massive overkill. This node is the answer someone on r/StableDiffusion actually gave when a user hit exactly that wall - they'd already ruled out comfyui-essentials's Simple Compare (broken by a recent ComfyUI update, repo unmaintained), WAS Node Suite's Number Input Condition (also unmaintained, could break any time), and Impact Pack's comparison node (works, but it's a huge pack that pulls in SAM just to get one comparison). The recommendation that landed: LogicUtils, because - in the commenter's own words - "it doesn't have dependencies."
What it does
The class name is LogicGateCompare, but you'll see it in the node picker as ABiggerThanB, which is a much better description of what it actually checks. Two required inputs, input1 and input2, both typed * (wildcard, not locked to numbers) with a default of 0. It compares them and returns a single BOOLEAN. Because the ports are wildcard rather than strictly INT or FLOAT, it isn't limited to comparing numbers the way the name suggests - anything Python can compare with a greater-than operator should work, though numbers are overwhelmingly the practical case (comparing two resolutions, two seeds, two computed values from earlier in the graph).
The workflow this solves is a real one, and it's not just about resolution math (the specific example in the Reddit thread was checking which side of an image was shorter before feeding a value into an upscaler). Any time a workflow needs to branch based on "is this value bigger than that one" - pick the larger of two dimensions, gate a step based on a threshold, compare a counter against a limit - this is the node, and it does exactly that one thing without pulling in anything else.
The inputs and outputs that matter
input1(required, any type, default 0) - the "A" side.input2(required, any type, default 0) - the "B" side.- Output:
BOOLEAN-Trueifinput1is bigger thaninput2.
Installing it
Open ComfyUI Manager and search ComfyUI-LogicUtils - that's the pack title, not the node name, since the node itself shows up under a different display name. Install, restart. Or by hand: cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, restart ComfyUI. No models, no meaningful dependency chain - confirmed by the exact Reddit thread that recommended this node in the first place. The pack ships an install hook you opt into with COMFYUI_LOGICUTILS_AUTO_INSTALL=1, with COMFYUI_LOGICUTILS_SKIP_INSTALL=1 as a hard off-switch; given there's nothing heavy here, you're unlikely to need either.
Where people get burned
The name mismatch is the first thing that trips people up: searching the node list for "Compare" or "LogicGateCompare" won't find it as easily as searching for "ABiggerThanB," which is what actually shows in the picker. If you're hunting for it manually rather than through Manager's search, that's the string to look for.
Second, since the ports are wildcard rather than INT/FLOAT, ComfyUI won't stop you from wiring in two values it genuinely can't compare - a string against a number, say, which raises a TypeError in Python and will fail the same way here. Keep both sides the same general kind of value (numbers against numbers) and it stays reliable. And one more from the pack's author, aria1th (also the trainer behind the Illustrious XL checkpoints under the AngelBottomless handle): documentation for this repo is thin by design admission, so this specific node's real-world credibility comes from community use, not from a wiki page - which is exactly the gap this page and the Reddit thread behind it are filling.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | * | 0 | — |
| input2 | * | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |