Skip to content

Commit 05192ff

Browse files
committed
fix self conditioning shape in diffusion prior
1 parent 9440411 commit 05192ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dalle2_pytorch/dalle2_pytorch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,9 @@ def forward(
10041004

10051005
# setup self conditioning
10061006

1007-
self_cond = None
10081007
if self.self_cond:
1009-
self_cond = default(self_cond, lambda: torch.zeros(batch, 1, self.dim, device = device, dtype = dtype))
1008+
self_cond = default(self_cond, lambda: torch.zeros(batch, self.dim, device = device, dtype = dtype))
1009+
self_cond = rearrange(self_cond, 'b d -> b 1 d')
10101010

10111011
# in section 2.2, last paragraph
10121012
# "... consisting of encoded text, CLIP text embedding, diffusion timestep embedding, noised CLIP image embedding, final embedding for prediction"

dalle2_pytorch/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.6.1'
1+
__version__ = '1.6.3'

0 commit comments

Comments
 (0)