ComfyUI Node
Int Unary Condition JK๐
Ask an integer a yes/no question
Int Unary Condition JK๐
- BOOLEAN
โopโพโบ
โa0โบ
CM_IntUnaryCondition turns a single integer into a BOOLEAN verdict. One op dropdown, one INT input (a), six questions to ask it: IsZero, IsNonZero, IsPositive, IsNegative, IsEven, IsOdd. The output is the boolean that feeds the rest of your graph.
What it's for
Condition nodes are the connective tissue between math and control flow in ComfyUI. You compute a number, ask it a question, and the answer drives a switch, a gate, or a toggle. Concrete patterns:
- IsEven / IsOdd on a seed or frame counter โ alternate between two paths every other frame. This is the poor-man's scheduler and it's shockingly common in animation loops.
- IsPositive on a delta โ "did the value increase?" before you branch.
- IsZero on a count โ "did that detector find nothing?" before you skip a detail pass.
- IsNonZero โ the same intent as converting to bool, but explicit and readable.
Because these return proper BOOLEANs, they chain straight into the pack's Bool And/OR gates or into any node with a boolean input - no conversion step.
Installing it
Ships with ComfyUI-JakeUpgrade:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
# Windows standalone: install.bat
# or: python_embeded\python.exe -s -m pip install -r requirements.txt
pip install -r requirements.txt # non-Windows
Or ComfyUI Manager, search "JakeUpgrade", install, restart.
Gotchas
- IsEven/IsOdd only make sense for whole numbers - which is fine, this node only takes ints anyway. If your upstream is a float, convert first or use the float condition twin.
- IsPositive excludes zero. Zero is neither positive nor negative; ask IsZero separately if the zero case matters to your branch.
- Manager's JakeUpgrade / IPAdapter_plus conflict warning is a false positive from the pack's
replacement/folder. - ComfyUI-MultiGPU causes CUDA errors with recent ComfyUI; the README says disable it.
Category๐ JK/โ๏ธ Math/๐ก Int
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| op | COMBO | Select unary condition to check | |
| a | INT | 0 | Input integer value to check |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | โ |