Update ImageMathNode.py

This commit is contained in:
mcDandy
2026-01-25 22:21:15 +01:00
parent f6413f4202
commit a395bbf3b4
+3 -3
View File
@@ -129,17 +129,17 @@ class ImageMathNode(io.ComfyNode):
"channel_count": ae.shape[3],
} | generate_dim_variables(ae)
norm_v = normalize_to_common_shape(ae, v, mode=length_mismatch)[1]
# Add all dynamic inputs
for k, v in V.items():
if v is not None:
# Normalize all images in V to match ae.shape
# Note: normalize_to_common_shape args are *tensors.
# We normalize individual V item against 'ae' (the reference shape)
norm_v = normalize_to_common_shape(ae, v, mode=length_mismatch)[1]
variables[k] = norm_v
for k, v in F.items():
variables[k] = v if v is not None else 0.0
for k, val in F.items():
variables[k] = val if val is not None else 0.0
tree = parse_expr(Expression);
visitor = UnifiedMathVisitor(variables, ae.shape)