From 7e1bd3e3c30e1d7e95f719a925f11d9225251f7c Mon Sep 17 00:00:00 2001 From: v0xie <28695009+v0xie@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:44:22 -0700 Subject: [PATCH] refactor: syntax and add 0.0 on new line --- modules/sd_schedulers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/sd_schedulers.py b/modules/sd_schedulers.py index 19d294c1d..6f2dc6308 100644 --- a/modules/sd_schedulers.py +++ b/modules/sd_schedulers.py @@ -122,9 +122,9 @@ def beta_scheduler(n, sigma_min, sigma_max, inner_model, device): beta = 0.6 timesteps = 1 - np.linspace(0, 1, n) timesteps = [stats.beta.ppf(x, alpha, beta) for x in timesteps] - sigmas = [sigma_min + ((x)*(sigma_max-sigma_min)) for x in timesteps] + [0.0] - sigmas = torch.FloatTensor(sigmas).to(device) - return sigmas + sigmas = [sigma_min + (x * (sigma_max-sigma_min)) for x in timesteps] + sigmas += [0.0] + return torch.FloatTensor(sigmas).to(device) schedulers = [