add scaled_linear schedule in DDIM
This commit is contained in:
parent
eceeb97242
commit
65788e46ed
|
@ -71,6 +71,9 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
|
|||
|
||||
if beta_schedule == "linear":
|
||||
self.betas = np.linspace(beta_start, beta_end, timesteps, dtype=np.float32)
|
||||
elif beta_schedule == "scaled_linear":
|
||||
# this schedule is very specific to the latent diffusion model.
|
||||
self.betas = np.linspace(beta_start**0.5, beta_end**0.5, timesteps, dtype=np.float32) ** 2
|
||||
elif beta_schedule == "squaredcos_cap_v2":
|
||||
# Glide cosine schedule
|
||||
self.betas = betas_for_alpha_bar(timesteps)
|
||||
|
|
Loading…
Reference in New Issue