Skip to content

Commit

Permalink
fix: cross attention skip connection
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioschneider committed Sep 25, 2022
1 parent d60eefa commit 42bf374
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion audio_diffusion_pytorch/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def __init__(
def forward(self, x: Tensor, *, context: Optional[Tensor] = None) -> Tensor:
x = self.attention(x) + x
if self.use_cross_attention:
x = self.cross_attention(x, context=context)
x = self.cross_attention(x, context=context) + x
x = self.feed_forward(x) + x
return x

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="audio-diffusion-pytorch",
packages=find_packages(exclude=[]),
version="0.0.44",
version="0.0.45",
license="MIT",
description="Audio Diffusion - PyTorch",
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 42bf374

Please sign in to comment.