Ino Compare Int
Six comparison operators, one boolean out — the tiny logic node that gates your workflows
- BOOLEAN
ComfyUI's graph is just an if-statement that got out of hand. The moment you want "only run the upscaler if the image is bigger than 1024" or "stop after batch N," you need a comparison - and Ino Compare Int is the one that does it. It takes two integers, compares them with the operator you pick, and outputs a single boolean. That's the whole node.
The description is refreshingly literal: "Compares two integer values using a selected operator." No strings, no floats, no cleverness - just the six operators everyone expects.
How it works
Two int inputs (int_a, int_b), a compare dropdown with =, <, >, <=, >=, <> (that last one is "not equal" - the pack's spelling of !=), and it returns the boolean result. Zero processing beyond the comparison, so it's instant and can sit anywhere in the graph. The <> operator trips people up at first glance, but it's just inequality.
Inputs and outputs
- int_a / int_b - the two integers to compare. Both default to 0; at least one of them will usually be wired from another node (a batch size, an image dimension, a counter).
- compare - the operator:
=,<,>,<=,>=,<>.
Output: BOOLEAN - true if the comparison holds.
Where it wires in
Boolean routing. Feed the result into a switch node (the pack has InoSwitchOnBool for exactly this), an enabled toggle on a downstream node, or a conditional save - "only archive if this batch produced more than zero files." Combined with InoConditionBoolean for AND/OR logic, you can build real control flow out of these little nodes. It's also handy as a sanity check: compare an image's dimension against a target and branch on it.
Installing it
Part of ComfyUI-InoNodes. ComfyUI Manager → search "ComfyUI Ino Nodes" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/ComfyUI-InoNodes
cd comfyui_ino_nodes
pip install -r requirements.txt
Restart after. No keys, no models - it's as dependency-free as a node gets.
Common issues
Not much to get wrong, honestly. The one trap is type mismatch: both inputs must actually be integers at runtime. If you wire a float or a string in, the comparison can fail or behave unexpectedly - cast first (the pack's InoCastAnyToInt exists for exactly this). And remember <> means "not equal": if you read it as "greater than or less than" you're still right, but it reads as a double-barreled operator and people do a double-take. That's the whole failure surface for a node this small.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| int_a | INT | 0 | — |
| int_b | INT | 0 | — |
| compare | COMBO | 6 options: =, <, >, <=, >=, <> |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |