Merge branch 'development' into development

This commit is contained in:
Peter Baylies 2022-09-14 20:03:39 -04:00 committed by GitHub
commit 66ff890b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,9 +281,9 @@ class BasicTransformerBlock(nn.Module):
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.clone()))
x += self.attn2(self.norm2(x.clone()), context=context)
x += self.ff(self.norm3(x.clone()))
return x