mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 02:45:05 +08:00
refactor: syntax and add 0.0 on new line
This commit is contained in:
parent
a5f66b5003
commit
7e1bd3e3c3
@ -122,9 +122,9 @@ def beta_scheduler(n, sigma_min, sigma_max, inner_model, device):
|
|||||||
beta = 0.6
|
beta = 0.6
|
||||||
timesteps = 1 - np.linspace(0, 1, n)
|
timesteps = 1 - np.linspace(0, 1, n)
|
||||||
timesteps = [stats.beta.ppf(x, alpha, beta) for x in timesteps]
|
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 = [sigma_min + (x * (sigma_max-sigma_min)) for x in timesteps]
|
||||||
sigmas = torch.FloatTensor(sigmas).to(device)
|
sigmas += [0.0]
|
||||||
return sigmas
|
return torch.FloatTensor(sigmas).to(device)
|
||||||
|
|
||||||
|
|
||||||
schedulers = [
|
schedulers = [
|
||||||
|
Loading…
Reference in New Issue
Block a user