From 1a81670718652541f5040db73b1dbbf7565f1129 Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Mon, 6 Jun 2022 17:45:14 +0200 Subject: [PATCH] fix quadratic_beta_schedule (#141) --- dalle2_pytorch/dalle2_pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dalle2_pytorch/dalle2_pytorch.py b/dalle2_pytorch/dalle2_pytorch.py index ca3eba7..faa7bc1 100644 --- a/dalle2_pytorch/dalle2_pytorch.py +++ b/dalle2_pytorch/dalle2_pytorch.py @@ -373,7 +373,7 @@ def quadratic_beta_schedule(timesteps): scale = 1000 / timesteps beta_start = scale * 0.0001 beta_end = scale * 0.02 - return torch.linspace(beta_start**2, beta_end**2, timesteps, dtype = torch.float64) ** 2 + return torch.linspace(beta_start**0.5, beta_end**0.5, timesteps, dtype = torch.float64) ** 2 def sigmoid_beta_schedule(timesteps):