ComfyUI-SimpleLogics
A lightweight ComfyUI node library providing logic operators, type conversions, math utilities, and switch nodes.
Nodes (37)
GeoCalib → fSpy JSON, explained
The two-input gate that makes conditional workflows click
Turning True/False into 1/0 without a second thought
The same 0/1 trick, in float flavor
Keep your values inside the rails
The range cop for integer values
If/else for numbers in your graph
Gating workflows on a number
Truncation, not rounding — the trap that eats 2.999
The conversion you'll half-skip, and why it exists
Turning numbers into words
Making ComfyUI read numbers as switches
The tiny fix for ComfyUI's strictest mismatch
When your integer needs to flow into a looser type
Numbers into text, for prompts and filenames
The node that's basically always true
Read this before you wire it in
Pick the bigger of two floats, no drama
A ceiling guard you can wire in seconds
The boring math node you'll actually reach for
The 'never let steps exceed this' node
The gate nobody needs until they do
'neither of these' is a real condition too
The one-boolean flip that makes workflows readable
Turn a number into a switch condition
The type-cast nobody explains to beginners
The polite way to force any number into an integer
And why you'll get '5.0' instead of '5'
The 'any of these is good enough' gate
Parse text into something math can use
'3.9' becomes 3, and that's by design
The permissive parser in the middle
The node that powers 'if this, use that' workflows
Flip between two values on a condition
Pick between two step counts without rebuilding the graph
Swap prompts on a condition, not by hand
The 'exactly one' gate for toggle logic
ComfyUI-SimpleLogics
A lightweight ComfyUI node library providing logic operators, type conversions, math utilities, and switch nodes.
No extra dependencies
Installation
Clone into your ComfyUI/custom_nodes/ folder:
git clone https://github.com/danipisca07/ComfyUI-SimpleLogics
Nodes
Convert (SimpleLogics/Convert)
| Node | Description |
|------|-------------|
| Int → Float | Cast integer to float |
| Float → Int | Truncate float to integer |
| Int / Float → String | Numeric to text |
| String → Int / Float | Parse text to number |
| Bool → Int | True → 1, False → 0 |
| Int → Bool | 0 → False, anything else → True |
Logic (SimpleLogics/Logic)
AND, OR, NOT, XOR, NAND, NOR — all take BOOLEAN inputs and return BOOLEAN.
Compare (SimpleLogics/Compare)
Compare Int / Compare Float — pick an operator (== != > < >= <=), returns BOOLEAN.
Math (SimpleLogics/Math)
| Node | Description |
|------|-------------|
| Max / Min Int | Larger / smaller of two integers |
| Max / Min Float | Larger / smaller of two floats |
| Clamp Int / Float | Constrain a value between min and max |
Switch (SimpleLogics/Switch)
All switch nodes take a condition (BOOLEAN) and return if_true or if_false.
| Node | Input types | |------|-------------| | Switch Int | INT | | Switch Float | FLOAT | | Switch String | STRING | | Switch Any | Any type |
Running Tests
pip install pytest
pytest tests/
Contributions?
Welcome