Extensions/ComfyUI-SimpleLogics
ComfyUI Extension

ComfyUI-SimpleLogics

A lightweight ComfyUI node library providing logic operators, type conversions, math utilities, and switch nodes.

By danipisca07·Created 6 months ago·Updated 6 months ago· 0
danipisca07/ComfyUI-SimpleLogics
Nodes37
On cloudLocal install
CategoryGeoCalib, SimpleLogics/Logic
Stars0
Updated6 months ago

Nodes (37)

GeoCalib → fSpy JSON

GeoCalib → fSpy JSON, explained

GeoCalib
AND

The two-input gate that makes conditional workflows click

SimpleLogics/Logic
Bool → Int

Turning True/False into 1/0 without a second thought

SimpleLogics/Convert
Bool → Number

The same 0/1 trick, in float flavor

SimpleLogics/Convert
Clamp Float

Keep your values inside the rails

SimpleLogics/Math
Clamp Int

The range cop for integer values

SimpleLogics/Math
Compare Float

If/else for numbers in your graph

SimpleLogics/Compare
Compare Int

Gating workflows on a number

SimpleLogics/Compare
Float → Int

Truncation, not rounding — the trap that eats 2.999

SimpleLogics/Convert
Float → Number

The conversion you'll half-skip, and why it exists

SimpleLogics/Convert
Float → String

Turning numbers into words

SimpleLogics/Convert
Int → Bool

Making ComfyUI read numbers as switches

SimpleLogics/Convert
Int → Float

The tiny fix for ComfyUI's strictest mismatch

SimpleLogics/Convert
Int → Number

When your integer needs to flow into a looser type

SimpleLogics/Convert
Int → String

Numbers into text, for prompts and filenames

SimpleLogics/Convert
Is Not Null (Image)

The node that's basically always true

SimpleLogics/Logic
Is Not Null (Text)

Read this before you wire it in

SimpleLogics/Logic
Max Float

Pick the bigger of two floats, no drama

SimpleLogics/Math
Max Int

A ceiling guard you can wire in seconds

SimpleLogics/Math
Min Float

The boring math node you'll actually reach for

SimpleLogics/Math
Min Int

The 'never let steps exceed this' node

SimpleLogics/Math
NAND

The gate nobody needs until they do

SimpleLogics/Logic
NOR

'neither of these' is a real condition too

SimpleLogics/Logic
NOT

The one-boolean flip that makes workflows readable

SimpleLogics/Logic
Number → Bool

Turn a number into a switch condition

SimpleLogics/Convert
Number → Float

The type-cast nobody explains to beginners

SimpleLogics/Convert
Number → Int

The polite way to force any number into an integer

SimpleLogics/Convert
Number → String

And why you'll get '5.0' instead of '5'

SimpleLogics/Convert
OR

The 'any of these is good enough' gate

SimpleLogics/Logic
String → Float

Parse text into something math can use

SimpleLogics/Convert
String → Int

'3.9' becomes 3, and that's by design

SimpleLogics/Convert
String → Number

The permissive parser in the middle

SimpleLogics/Convert
Switch Any

The node that powers 'if this, use that' workflows

SimpleLogics/Switch
Switch Float

Flip between two values on a condition

SimpleLogics/Switch
Switch Int

Pick between two step counts without rebuilding the graph

SimpleLogics/Switch
Switch String

Swap prompts on a condition, not by hand

SimpleLogics/Switch
XOR

The 'exactly one' gate for toggle logic

SimpleLogics/Logic
Readme

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 | True1, False0 | | Int → Bool | 0False, 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