ComfyUI Node
Nifty Math
A ComfyUI node in nifty/number with 2 inputs and 3 outputs.
Nifty Math
- values
- int
- float
- boolean
◄expressiona + b►
Categorynifty/number
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| expression | STRING | a + b | Mathematical expression evaluated with the slot letters as variables. Supports: + - * / // % ** (power), comparisons (==, !=, <, >, <=, >=), boolean logic (and, or, not), ternary (x if cond else y), and functions: abs, round, min, max, pow, sqrt, floor, ceil, log, log2, log10, exp, sin, cos, tan, asin, acos, atan, atan2, radians, degrees, hypot, clamp(v,lo,hi), lerp(a,b,t), remap(v,a,b,c,d), and constants pi, tau, e, inf. Unconnected slots default to 0. |
| valuesopt | COMFY_AUTOGROW_V3 | Named variable inputs a–p. Connect values here to use them in the expression. Unconnected slots default to 0. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| int | INT | — |
| float | FLOAT | — |
| boolean | BOOLEAN | — |