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
805c36ac
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "2fba5ed38e584d5b75146816d851aadfb4b7b49f"
Commit
805c36ac
authored
Feb 17, 2024
by
comfyanonymous
Browse files
Make Stable Cascade work on old pytorch 2.0
parent
f2d1d16f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
comfy/ldm/cascade/stage_a.py
comfy/ldm/cascade/stage_a.py
+5
-1
No files found.
comfy/ldm/cascade/stage_a.py
View file @
805c36ac
...
...
@@ -150,7 +150,11 @@ class ResBlock(nn.Module):
mods
=
self
.
gammas
x_temp
=
self
.
_norm
(
x
,
self
.
norm1
)
*
(
1
+
mods
[
0
])
+
mods
[
1
]
x
=
x
+
self
.
depthwise
(
x_temp
)
*
mods
[
2
]
try
:
x
=
x
+
self
.
depthwise
(
x_temp
)
*
mods
[
2
]
except
:
#operation not implemented for bf16
x_temp
=
self
.
depthwise
[
0
](
x_temp
.
float
()).
to
(
x
.
dtype
)
x
=
x
+
self
.
depthwise
[
1
](
x_temp
)
*
mods
[
2
]
x_temp
=
self
.
_norm
(
x
,
self
.
norm2
)
*
(
1
+
mods
[
3
])
+
mods
[
4
]
x
=
x
+
self
.
channelwise
(
x_temp
.
permute
(
0
,
2
,
3
,
1
)).
permute
(
0
,
3
,
1
,
2
)
*
mods
[
5
]
...
...
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