diff --git a/dalle2_pytorch/dalle2_pytorch.py b/dalle2_pytorch/dalle2_pytorch.py index 35f3d1a..39b778b 100644 --- a/dalle2_pytorch/dalle2_pytorch.py +++ b/dalle2_pytorch/dalle2_pytorch.py @@ -591,7 +591,7 @@ class DiffusionPrior(nn.Module): else: x_recon = self.predict_start_from_noise(x, t = t, noise = self.net(x, t, **text_cond)) - if clip_denoised: + if clip_denoised and not self.predict_x0: x_recon.clamp_(-1., 1.) model_mean, posterior_variance, posterior_log_variance = self.q_posterior(x_start=x_recon, x_t=x, t=t) diff --git a/setup.py b/setup.py index 143c52d..d55db12 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( 'dream = dalle2_pytorch.cli:dream' ], }, - version = '0.0.39', + version = '0.0.40', license='MIT', description = 'DALL-E 2', author = 'Phil Wang',