diff --git a/ldm/modules/attention.py b/ldm/modules/attention.py index a8756c48754..cfb53b35f0b 100644 --- a/ldm/modules/attention.py +++ b/ldm/modules/attention.py @@ -244,9 +244,9 @@ def forward(self, x, context=None): def _forward(self, x, context=None): x = x.contiguous() if x.device.type == 'mps' else x - x = self.attn1(self.norm1(x)) + x - x = self.attn2(self.norm2(x), context=context) + x - x = self.ff(self.norm3(x)) + x + x += self.attn1(self.norm1(x)) + x += self.attn2(self.norm2(x), context=context) + x += self.ff(self.norm3(x)) return x