Compare commits

...
1 Commits
2 changed files with 3 additions and 1 deletions
@@ -211,6 +211,8 @@ class LinearAttention(nn.Module):
k = k.softmax(dim = -1) k = k.softmax(dim = -1)
q = q * self.scale q = q * self.scale
v = v / (h * w)
context = torch.einsum('b h d n, b h e n -> b h d e', k, v) context = torch.einsum('b h d n, b h e n -> b h d e', k, v)
out = torch.einsum('b h d e, b h d n -> b h e n', context, q) out = torch.einsum('b h d e, b h d n -> b h e n', context, q)
+1 -1
View File
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup( setup(
name = 'denoising-diffusion-pytorch', name = 'denoising-diffusion-pytorch',
packages = find_packages(), packages = find_packages(),
version = '0.26.3', version = '0.26.4',
license='MIT', license='MIT',
description = 'Denoising Diffusion Probabilistic Models - Pytorch', description = 'Denoising Diffusion Probabilistic Models - Pytorch',
author = 'Phil Wang', author = 'Phil Wang',