From 52fa16df185cd316f68c6e7e4ace1c55cdecbe20 Mon Sep 17 00:00:00 2001 From: Agustin Abreu Date: Thu, 11 Jan 2024 11:29:50 -0300 Subject: [PATCH] making extra_pnginfo argument optional. ComfyUI does not send the argument at all when using the API, and is making MathExpression node to crash --- py/math_expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/math_expression.py b/py/math_expression.py index aa7a17a..385eed2 100644 --- a/py/math_expression.py +++ b/py/math_expression.py @@ -130,7 +130,7 @@ class MathExpression: return target.shape[2] return target.shape[1] - def evaluate(self, expression, extra_pnginfo, prompt, a=None, b=None, c=None): + def evaluate(self, expression, prompt, extra_pnginfo={}, a=None, b=None, c=None): expression = expression.replace('\n', ' ').replace('\r', '') node = ast.parse(expression, mode='eval').body