use configured alpha/beta values in Beta scheduling

This commit is contained in:
v0xie 2024-07-19 14:08:44 -07:00
parent 3a5a66775c
commit f6f055a93d

View File

@ -118,8 +118,8 @@ def ddim_scheduler(n, sigma_min, sigma_max, inner_model, device):
def beta_scheduler(n, sigma_min, sigma_max, inner_model, device): def beta_scheduler(n, sigma_min, sigma_max, inner_model, device):
# From "Beta Sampling is All You Need" [arXiv:2407.12173] (Lee et. al, 2024) """ # From "Beta Sampling is All You Need" [arXiv:2407.12173] (Lee et. al, 2024) """
alpha = 0.6 alpha = shared.opts.beta_dist_alpha
beta = 0.6 beta = shared.opts.beta_dist_beta
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] sigmas = [sigma_min + (x * (sigma_max-sigma_min)) for x in timesteps]