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
2d280f17
Unverified
Commit
2d280f17
authored
Oct 21, 2024
by
YiYi Xu
Committed by
GitHub
Oct 21, 2024
Browse files
fix singlestep dpm tests (#9716)
fix Co-authored-by:
Sayak Paul
<
spsayakpaul@gmail.com
>
parent
63a0c9e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+1
-0
No files found.
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
View file @
2d280f17
...
...
@@ -330,6 +330,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
# Clipping the minimum of all lambda(t) for numerical stability.
# This is critical for cosine (squaredcos_cap_v2) noise schedule.
clipped_idx
=
torch
.
searchsorted
(
torch
.
flip
(
self
.
lambda_t
,
[
0
]),
self
.
config
.
lambda_min_clipped
)
clipped_idx
=
clipped_idx
.
item
()
timesteps
=
(
np
.
linspace
(
0
,
self
.
config
.
num_train_timesteps
-
1
-
clipped_idx
,
num_inference_steps
+
1
)
.
round
()[::
-
1
][:
-
1
]
...
...
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