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
bf7f9b49
Unverified
Commit
bf7f9b49
authored
Dec 06, 2023
by
Ian
Committed by
GitHub
Dec 06, 2023
Browse files
Fix typing inconsistency in Euler discrete scheduler (#6052)
parent
e192ae08
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_euler_discrete.py
src/diffusers/schedulers/scheduling_euler_discrete.py
+1
-1
No files found.
src/diffusers/schedulers/scheduling_euler_discrete.py
View file @
bf7f9b49
...
@@ -270,7 +270,7 @@ class EulerDiscreteScheduler(SchedulerMixin, ConfigMixin):
...
@@ -270,7 +270,7 @@ class EulerDiscreteScheduler(SchedulerMixin, ConfigMixin):
if
self
.
config
.
interpolation_type
==
"linear"
:
if
self
.
config
.
interpolation_type
==
"linear"
:
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
sigmas
=
np
.
interp
(
timesteps
,
np
.
arange
(
0
,
len
(
sigmas
)),
sigmas
)
elif
self
.
config
.
interpolation_type
==
"log_linear"
:
elif
self
.
config
.
interpolation_type
==
"log_linear"
:
sigmas
=
torch
.
linspace
(
np
.
log
(
sigmas
[
-
1
]),
np
.
log
(
sigmas
[
0
]),
num_inference_steps
+
1
).
exp
()
sigmas
=
torch
.
linspace
(
np
.
log
(
sigmas
[
-
1
]),
np
.
log
(
sigmas
[
0
]),
num_inference_steps
+
1
).
exp
()
.
numpy
()
else
:
else
:
raise
ValueError
(
raise
ValueError
(
f
"
{
self
.
config
.
interpolation_type
}
is not implemented. Please specify interpolation_type to either"
f
"
{
self
.
config
.
interpolation_type
}
is not implemented. Please specify interpolation_type to either"
...
...
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