ComfyUI Node

Nifty Math

A ComfyUI node in nifty/number with 2 inputs and 3 outputs.

By Stibo·Created 5 months ago·Updated 2 months ago· 7
Nifty Math
  • values
  • int
  • float
  • boolean
expressiona + b
Categorynifty/number

Inputs (2)

NameTypeDefaultDescription
expressionSTRINGa + bMathematical 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.
valuesoptCOMFY_AUTOGROW_V3Named variable inputs a–p. Connect values here to use them in the expression. Unconnected slots default to 0.

Outputs (3)

NameTypeDescription
intINT
floatFLOAT
booleanBOOLEAN