Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
9070c394
Unverified
Commit
9070c394
authored
Aug 16, 2022
by
Patrick von Platen
Committed by
GitHub
Aug 16, 2022
Browse files
[Naming] correct config naming of DDIM pipeline (#187)
parent
194ed794
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/diffusers/schedulers/scheduling_ddim.py
src/diffusers/schedulers/scheduling_ddim.py
+3
-3
tests/test_modeling_utils.py
tests/test_modeling_utils.py
+1
-1
No files found.
src/diffusers/schedulers/scheduling_ddim.py
View file @
9070c394
...
@@ -59,7 +59,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -59,7 +59,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
trained_betas
=
None
,
trained_betas
=
None
,
timestep_values
=
None
,
timestep_values
=
None
,
clip_sample
=
True
,
clip_sample
=
True
,
clip
_alpha_
a
t_one
=
True
,
set
_alpha_t
o
_one
=
True
,
tensor_format
=
"pt"
,
tensor_format
=
"pt"
,
):
):
...
@@ -79,9 +79,9 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -79,9 +79,9 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
# At every step in ddim, we are looking into the previous alphas_cumprod
# At every step in ddim, we are looking into the previous alphas_cumprod
# For the final step, there is no previous alphas_cumprod because we are already at 0
# For the final step, there is no previous alphas_cumprod because we are already at 0
# `
clip
_alpha_
a
t_one` decides whether we set this paratemer simply to one or
# `
set
_alpha_t
o
_one` decides whether we set this paratemer simply to one or
# whether we use the final alpha of the "non-previous" one.
# whether we use the final alpha of the "non-previous" one.
self
.
final_alpha_cumprod
=
np
.
array
(
1.0
)
if
clip
_alpha_
a
t_one
else
self
.
alphas_cumprod
[
0
]
self
.
final_alpha_cumprod
=
np
.
array
(
1.0
)
if
set
_alpha_t
o
_one
else
self
.
alphas_cumprod
[
0
]
# setable values
# setable values
self
.
num_inference_steps
=
None
self
.
num_inference_steps
=
None
...
...
tests/test_modeling_utils.py
View file @
9070c394
...
@@ -871,7 +871,7 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -871,7 +871,7 @@ class PipelineTesterMixin(unittest.TestCase):
beta_end
=
0.012
,
beta_end
=
0.012
,
beta_schedule
=
"scaled_linear"
,
beta_schedule
=
"scaled_linear"
,
clip_sample
=
False
,
clip_sample
=
False
,
clip
_alpha_
a
t_one
=
False
,
set
_alpha_t
o
_one
=
False
,
)
)
sd_pipe
.
scheduler
=
scheduler
sd_pipe
.
scheduler
=
scheduler
...
...
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