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
7ea6bb03
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "62f5ae68ec2ebee34f2a0bbbf195343165e4ce3a"
Commit
7ea6bb03
authored
Nov 16, 2023
by
comfyanonymous
Browse files
Print warning when controlnet can't be applied instead of crashing.
parent
dcec1047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
comfy/ldm/modules/diffusionmodules/openaimodel.py
comfy/ldm/modules/diffusionmodules/openaimodel.py
+4
-1
No files found.
comfy/ldm/modules/diffusionmodules/openaimodel.py
View file @
7ea6bb03
...
@@ -255,7 +255,10 @@ def apply_control(h, control, name):
...
@@ -255,7 +255,10 @@ def apply_control(h, control, name):
if
control
is
not
None
and
name
in
control
and
len
(
control
[
name
])
>
0
:
if
control
is
not
None
and
name
in
control
and
len
(
control
[
name
])
>
0
:
ctrl
=
control
[
name
].
pop
()
ctrl
=
control
[
name
].
pop
()
if
ctrl
is
not
None
:
if
ctrl
is
not
None
:
h
+=
ctrl
try
:
h
+=
ctrl
except
:
print
(
"warning control could not be applied"
,
h
.
shape
,
ctrl
.
shape
)
return
h
return
h
class
UNetModel
(
nn
.
Module
):
class
UNetModel
(
nn
.
Module
):
...
...
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