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
chenpangpang
ComfyUI
Commits
e032ca61
Commit
e032ca61
authored
Jul 19, 2023
by
comfyanonymous
Browse files
Fix ddim issue with older torch versions.
parent
18885f80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
comfy/k_diffusion/external.py
comfy/k_diffusion/external.py
+3
-1
No files found.
comfy/k_diffusion/external.py
View file @
e032ca61
...
@@ -91,7 +91,9 @@ class DiscreteSchedule(nn.Module):
...
@@ -91,7 +91,9 @@ class DiscreteSchedule(nn.Module):
return
log_sigma
.
exp
()
return
log_sigma
.
exp
()
def
predict_eps_discrete_timestep
(
self
,
input
,
t
,
**
kwargs
):
def
predict_eps_discrete_timestep
(
self
,
input
,
t
,
**
kwargs
):
sigma
=
self
.
t_to_sigma
(
t
.
round
())
if
t
.
dtype
!=
torch
.
int64
and
t
.
dtype
!=
torch
.
int32
:
t
=
t
.
round
()
sigma
=
self
.
t_to_sigma
(
t
)
input
=
input
*
((
utils
.
append_dims
(
sigma
,
input
.
ndim
)
**
2
+
1.0
)
**
0.5
)
input
=
input
*
((
utils
.
append_dims
(
sigma
,
input
.
ndim
)
**
2
+
1.0
)
**
0.5
)
return
(
input
-
self
(
input
,
sigma
,
**
kwargs
))
/
utils
.
append_dims
(
sigma
,
input
.
ndim
)
return
(
input
-
self
(
input
,
sigma
,
**
kwargs
))
/
utils
.
append_dims
(
sigma
,
input
.
ndim
)
...
...
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