Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
65788e46
Commit
65788e46
authored
Jun 29, 2022
by
patil-suraj
Browse files
add scaled_linear schedule in DDIM
parent
eceeb972
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/diffusers/schedulers/scheduling_ddim.py
src/diffusers/schedulers/scheduling_ddim.py
+3
-0
No files found.
src/diffusers/schedulers/scheduling_ddim.py
View file @
65788e46
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment