Integer Compare
A true/false gate for your workflow, with a readable receipt
- result
- expression
Integer Compare is the "is A bigger than B?" node, and it's the closest thing this pack has to a conditional gate. You pick a comparison, feed it two integers, and it returns a BOOLEAN result you can use to switch behavior downstream - plus an expression string (5 > 3 = True) so you can see the reasoning in a text display.
ComfyUI has no built-in if statement, which is why compare nodes exist. The pattern goes: compute some integer (a batch size, a frame count, a seed), compare it to a threshold, and let the boolean wire into whatever respects it - a bypass, a switch, a conditional router from another pack. The pack itself doesn't ship a node that consumes booleans to branch, so think of this as the decision half; you pair it with whatever branching mechanism you already use. Where it genuinely shines is sanity-guarding: "only run the upscale if the batch is under 32 frames" is a real workflow question, and this makes it a wire.
Inputs and outputs
comparison is a dropdown with six options: equal, not_equal, greater_than, less_than, greater_equal, less_equal. a and b are INTs, both wireable, so you can compare a computed value against a constant. Outputs:
result- aBOOLEAN. The answer, ready to wire.expression- aSTRINGlike10 <= 8 = False. The receipt, for when you're debugging why a gate didn't fire.
Installing it
ComfyBros installs like any custom node pack. ComfyUI Manager - search "ComfyBros" - or:
cd ComfyUI/custom_nodes
git clone https://github.com/turnbros/ComfyBros
Then restart ComfyUI. The README's mention of requirements.txt is stale - the real deps live in pyproject.toml and Manager installs them. Integer Compare lives under ComfyBros/Math.
Gotchas
The obvious trap is the classic off-by-one with greater_than versus greater_equal - decide whether "exactly 8" should pass before you wire it. And because both operands are integers, a float comparison won't plug in directly; you'd need to round or use a float-comparing node. Beyond that, it's a two-integer decision box with a paper trail - about as reliable as this pack gets.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| comparison | COMBO | equal | 6 options: equal, not_equal, greater_than, less_than, greater_equal, less_equal |
| a | INT | 0-2147483648–2147483647 | — |
| b | INT | 0-2147483648–2147483647 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |
| expression | STRING | — |