Messed up and switched width and height

This commit is contained in:
mcDandy
2025-08-22 12:35:18 +02:00
parent 5b38c331e4
commit 7b5b6d18d3
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -97,13 +97,13 @@ class ImageMathNode:
d = torch.zeros_like(a) if d is None else d
batch = range(0,a.shape[0],1)
width = range(0,a.shape[1],1)
height = range(0,a.shape[2],1)
width = range(0,a.shape[2],1)
height = range(0,a.shape[1],1)
color = range(0,a.shape[3],1)
B = getIndexTensorAlongDim(a, 0)
W = getIndexTensorAlongDim(a, 1)
H = getIndexTensorAlongDim(a, 2)
W = getIndexTensorAlongDim(a, 2)
H = getIndexTensorAlongDim(a, 1)
C = getIndexTensorAlongDim(a, 3)
variables = {'a': a, 'b': b, 'c': c, 'd': d, 'w': w, 'x': x, 'y': y, 'z': z,'B':B,'X':W,'Y':H,'C':C,'W':a.shape[1],'H':a.shape[2] }
+3 -3
View File
@@ -95,11 +95,11 @@ class LatentMathNode:
d = torch.zeros_like(a) if d is None else d["samples"]
B = getIndexTensorAlongDim(a, 0)
W = getIndexTensorAlongDim(a, 2)
H = getIndexTensorAlongDim(a, 3)
W = getIndexTensorAlongDim(a, 3)
H = getIndexTensorAlongDim(a, 2)
C = getIndexTensorAlongDim(a, 1)
variables = {'a': a, 'b': b, 'c': c, 'd': d, 'w': w, 'x': x, 'y': y, 'z': z,'B':B,'X':W,'Y':H,'C':C,'W':a.shape[2],'H':a.shape[3]}
variables = {'a': a, 'b': b, 'c': c, 'd': d, 'w': w, 'x': x, 'y': y, 'z': z,'B':B,'X':W,'Y':H,'C':C,'W':a.shape[3],'H':a.shape[2]}
input_stream = InputStream(Latent)
lexer = MathExprLexer(input_stream)
stream = CommonTokenStream(lexer)
+3 -3
View File
@@ -136,11 +136,11 @@ class NoiseMathNode:
self.vd = self.vd.generate_noise(input_latent)
B = getIndexTensorAlongDim(input_latent["samples"], 0)
W = getIndexTensorAlongDim(input_latent["samples"], 2)
H = getIndexTensorAlongDim(input_latent["samples"], 3)
W = getIndexTensorAlongDim(input_latent["samples"], 3)
H = getIndexTensorAlongDim(input_latent["samples"], 2)
C = getIndexTensorAlongDim(input_latent["samples"], 1)
variables = {'a': self.va.generate_noise(input_latent), 'b': self.vb, 'c': self.vc, 'd': self.vd, 'w': self.vw, 'x': self.vx, 'y': self.vy, 'z': self.vz,'B':B,'X':W,'Y':H,'C':C,'W':input_latent["samples"].shape[2],'H':input_latent["samples"].shape[3],'I':input_latent["samples"]}
variables = {'a': self.va.generate_noise(input_latent), 'b': self.vb, 'c': self.vc, 'd': self.vd, 'w': self.vw, 'x': self.vx, 'y': self.vy, 'z': self.vz,'B':B,'X':W,'Y':H,'C':C,'W':input_latent["samples"].shape[3],'H':input_latent["samples"].shape[2],'I':input_latent["samples"]}
input_stream = InputStream(self.expr)
lexer = MathExprLexer(input_stream)
stream = CommonTokenStream(lexer)