Forgot to rename things. Removed copy of example node.

This commit is contained in:
mcDandy
2025-07-28 00:45:16 +02:00
parent e9da223e6a
commit 48387498ad
4 changed files with 11 additions and 127 deletions
+5 -5
View File
@@ -15,8 +15,8 @@ class ImageMathNode:
Latent, bound to variables with the same name. Defaults to zero latent if not provided.
w, x, y, z:
Floats, bound to variables of the expression. Defaults to 0.0 if not provided.
Tensor expression:
String, describing expression to mix latents. Valid functions are sin, cos, tan, abs, sqrt, min, max, norm. Valid operators are +, -, *, /, ^, %.
Image expression:
String, describing expression to mix images. Valid functions are sin, cos, tan, abs, sqrt, min, max, norm. Valid operators are +, -, *, /, ^, %. Usable constants are e and pi.
OUTPUTS:
LATENT:
@@ -35,7 +35,7 @@ class ImageMathNode:
}),
"Tensor": ("STRING", {
"Image": ("STRING", {
"multiline": False, #True if you want the field to look like the one on the ClipTextEncode node
"default": "a*(1-w)+b*w",
"description": "Describes composition of the image. Valid functions are sin,cos,tan,abs,sqrt,min,max. Valid operators are +,-,*,/,^,%"
@@ -85,12 +85,12 @@ class ImageMathNode:
CATEGORY = "More math"
def imgMathNode(self, Tensor, a, b=None, c=None, d=None, w=0.0, x=0.0, y=0.0, z=0.0):
def imgMathNode(self, Image, a, b=None, c=None, d=None, w=0.0, x=0.0, y=0.0, z=0.0):
b = torch.zeros_like(a) if b is None else b
c = torch.zeros_like(a) if c is None else c
d = torch.zeros_like(a) if d is None else d
tokens = tokenize_expression(Tensor)
tokens = tokenize_expression(Image)
parser = Parser(tokens)
ast = parser.parse_expression()
print(a.shape)