Skip to content

Commit bf1beaa

Browse files
committed
revert 49a96b9 due to conflicts during training
1 parent 7dee9ef commit bf1beaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: ldm/modules/attention.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ def forward(self, x, context=None):
297297

298298
def _forward(self, x, context=None):
299299
x = x.contiguous() if x.device.type == 'mps' else x
300-
x += self.attn1(self.norm1(x))
301-
x += self.attn2(self.norm2(x), context=context)
302-
x += self.ff(self.norm3(x))
300+
x = self.attn1(self.norm1(x)) + x
301+
x = self.attn2(self.norm2(x), context=context) + x
302+
x = self.ff(self.norm3(x)) + x
303303
return x
304304

305305

0 commit comments

Comments
 (0)