Commit 65788e46 authored by patil-suraj's avatar patil-suraj
Browse files

add scaled_linear schedule in DDIM

parent eceeb972
...@@ -71,6 +71,9 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin): ...@@ -71,6 +71,9 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
if beta_schedule == "linear": if beta_schedule == "linear":
self.betas = np.linspace(beta_start, beta_end, timesteps, dtype=np.float32) 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": elif beta_schedule == "squaredcos_cap_v2":
# Glide cosine schedule # Glide cosine schedule
self.betas = betas_for_alpha_bar(timesteps) self.betas = betas_for_alpha_bar(timesteps)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment