Skip to content

Commit 282ef30

Browse files
committed
remove some dead code
1 parent eb04808 commit 282ef30

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

dalle_pytorch/attention.py

-4
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,6 @@ def forward(self, x, mask = None):
310310
mask_value = max_neg_value(q) / 2
311311
attn_mask.masked_fill_(mask, mask_value)
312312

313-
if self.noncausal_attn_len:
314-
ind = slice(0, self.noncausal_attn_len)
315-
attn_mask[ind, ind] = 0.
316-
317313
out = self.attn_fn(q, k, v, attn_mask = attn_mask, key_padding_mask = key_pad_mask)
318314
out = rearrange(out, 'b h n d -> b n (h d)')
319315
out = self.to_out(out)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'dalle-pytorch',
55
packages = find_packages(),
6-
version = '0.0.59',
6+
version = '0.0.60',
77
license='MIT',
88
description = 'DALL-E - Pytorch',
99
author = 'Phil Wang',

0 commit comments

Comments
 (0)