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
8d4c7d0e
Unverified
Commit
8d4c7d0e
authored
May 05, 2023
by
Patrick von Platen
Committed by
GitHub
May 05, 2023
Browse files
Fix config dpm (#3343)
parent
29ad75dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+1
-1
No files found.
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
View file @
8d4c7d0e
...
@@ -241,7 +241,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -241,7 +241,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
self
.
num_inference_steps
=
num_inference_steps
self
.
num_inference_steps
=
num_inference_steps
# Clipping the minimum of all lambda(t) for numerical stability.
# Clipping the minimum of all lambda(t) for numerical stability.
# This is critical for cosine (squaredcos_cap_v2) noise schedule.
# This is critical for cosine (squaredcos_cap_v2) noise schedule.
clipped_idx
=
torch
.
searchsorted
(
torch
.
flip
(
self
.
lambda_t
,
[
0
]),
self
.
lambda_min_clipped
)
clipped_idx
=
torch
.
searchsorted
(
torch
.
flip
(
self
.
lambda_t
,
[
0
]),
self
.
config
.
lambda_min_clipped
)
timesteps
=
(
timesteps
=
(
np
.
linspace
(
0
,
self
.
config
.
num_train_timesteps
-
1
-
clipped_idx
,
num_inference_steps
+
1
)
np
.
linspace
(
0
,
self
.
config
.
num_train_timesteps
-
1
-
clipped_idx
,
num_inference_steps
+
1
)
.
round
()[::
-
1
][:
-
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