Skip to main content
The ComfyMathExpression node evaluates a mathematical formula using a set of input values. You can write an expression using variable names (like a, b, c), and the node will calculate the result. It supports dynamically adding as many input values as needed for your calculation.

Inputs

Parameter Constraints:
  • The expression parameter cannot be empty or contain only whitespace.
  • The expression must evaluate to a finite numeric result (INT or FLOAT). Boolean or other non-numeric results will cause an error.
  • The input values for the values parameter can be numbers (INT or FLOAT) or boolean values (TRUE/FALSE).
  • At least one input value must be provided in the values group.

Outputs

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): bf6221a7e1e955bdb56482de0a86a782494b2775fdd2edfde9fd20a9df0fe1a7