From 579d4b42ddf70479fa9005f3d8e2bd60bdd841f3 Mon Sep 17 00:00:00 2001 From: Phil Wang Date: Sun, 24 Apr 2022 09:51:18 -0700 Subject: [PATCH] does not seem right to clip for the prior diffusion part --- dalle2_pytorch/dalle2_pytorch.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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',