diff --git a/src/more_math/ImageMathNode.py b/src/more_math/ImageMathNode.py index 264e408..357d986 100644 --- a/src/more_math/ImageMathNode.py +++ b/src/more_math/ImageMathNode.py @@ -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] } diff --git a/src/more_math/LatentMathNode.py b/src/more_math/LatentMathNode.py index 6d7b751..ef81fb0 100644 --- a/src/more_math/LatentMathNode.py +++ b/src/more_math/LatentMathNode.py @@ -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) diff --git a/src/more_math/NoiseMathNode.py b/src/more_math/NoiseMathNode.py index 7aebb02..5d44db3 100644 --- a/src/more_math/NoiseMathNode.py +++ b/src/more_math/NoiseMathNode.py @@ -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)