Skip to content

Commit 7b5b6d1

Browse files
committed
Messed up and switched width and height
1 parent 5b38c33 commit 7b5b6d1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/more_math/ImageMathNode.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ def imgMathNode(self, Image, a, b=None, c=None, d=None, w=0.0, x=0.0, y=0.0, z=0
9797
d = torch.zeros_like(a) if d is None else d
9898

9999
batch = range(0,a.shape[0],1)
100-
width = range(0,a.shape[1],1)
101-
height = range(0,a.shape[2],1)
100+
width = range(0,a.shape[2],1)
101+
height = range(0,a.shape[1],1)
102102
color = range(0,a.shape[3],1)
103103

104104
B = getIndexTensorAlongDim(a, 0)
105-
W = getIndexTensorAlongDim(a, 1)
106-
H = getIndexTensorAlongDim(a, 2)
105+
W = getIndexTensorAlongDim(a, 2)
106+
H = getIndexTensorAlongDim(a, 1)
107107
C = getIndexTensorAlongDim(a, 3)
108108

109109
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] }

src/more_math/LatentMathNode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ def latMathNode(self, Latent, a, b=None, c=None, d=None, w=0.0, x=0.0, y=0.0, z=
9595
d = torch.zeros_like(a) if d is None else d["samples"]
9696

9797
B = getIndexTensorAlongDim(a, 0)
98-
W = getIndexTensorAlongDim(a, 2)
99-
H = getIndexTensorAlongDim(a, 3)
98+
W = getIndexTensorAlongDim(a, 3)
99+
H = getIndexTensorAlongDim(a, 2)
100100
C = getIndexTensorAlongDim(a, 1)
101101

102-
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]}
102+
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]}
103103
input_stream = InputStream(Latent)
104104
lexer = MathExprLexer(input_stream)
105105
stream = CommonTokenStream(lexer)

src/more_math/NoiseMathNode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ def generate_noise(self, input_latent:torch.Tensor) -> torch.Tensor:
136136
self.vd = self.vd.generate_noise(input_latent)
137137

138138
B = getIndexTensorAlongDim(input_latent["samples"], 0)
139-
W = getIndexTensorAlongDim(input_latent["samples"], 2)
140-
H = getIndexTensorAlongDim(input_latent["samples"], 3)
139+
W = getIndexTensorAlongDim(input_latent["samples"], 3)
140+
H = getIndexTensorAlongDim(input_latent["samples"], 2)
141141
C = getIndexTensorAlongDim(input_latent["samples"], 1)
142142

143-
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"]}
143+
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"]}
144144
input_stream = InputStream(self.expr)
145145
lexer = MathExprLexer(input_stream)
146146
stream = CommonTokenStream(lexer)

0 commit comments

Comments
 (0)