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
7914c47d
"ppstructure/vscode:/vscode.git/clone" did not exist on "3bf40c7628cacb52498bd2830e7e75498e29e07c"
Commit
7914c47d
authored
Jul 14, 2024
by
comfyanonymous
Browse files
Quick fix for the promax controlnet.
parent
79547efb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
comfy/cldm/cldm.py
comfy/cldm/cldm.py
+3
-3
comfy/controlnet.py
comfy/controlnet.py
+1
-1
No files found.
comfy/cldm/cldm.py
View file @
7914c47d
...
@@ -92,7 +92,7 @@ class ControlNet(nn.Module):
...
@@ -92,7 +92,7 @@ class ControlNet(nn.Module):
transformer_depth_middle
=
None
,
transformer_depth_middle
=
None
,
transformer_depth_output
=
None
,
transformer_depth_output
=
None
,
attn_precision
=
None
,
attn_precision
=
None
,
union_controlnet
=
Fals
e
,
union_controlnet
_num_control_type
=
Non
e
,
device
=
None
,
device
=
None
,
operations
=
comfy
.
ops
.
disable_weight_init
,
operations
=
comfy
.
ops
.
disable_weight_init
,
**
kwargs
,
**
kwargs
,
...
@@ -320,8 +320,8 @@ class ControlNet(nn.Module):
...
@@ -320,8 +320,8 @@ class ControlNet(nn.Module):
self
.
middle_block_out
=
self
.
make_zero_conv
(
ch
,
operations
=
operations
,
dtype
=
self
.
dtype
,
device
=
device
)
self
.
middle_block_out
=
self
.
make_zero_conv
(
ch
,
operations
=
operations
,
dtype
=
self
.
dtype
,
device
=
device
)
self
.
_feature_size
+=
ch
self
.
_feature_size
+=
ch
if
union_controlnet
:
if
union_controlnet
_num_control_type
is
not
None
:
self
.
num_control_type
=
6
self
.
num_control_type
=
union_controlnet_num_control_type
num_trans_channel
=
320
num_trans_channel
=
320
num_trans_head
=
8
num_trans_head
=
8
num_trans_layer
=
1
num_trans_layer
=
1
...
...
comfy/controlnet.py
View file @
7914c47d
...
@@ -414,7 +414,7 @@ def load_controlnet(ckpt_path, model=None):
...
@@ -414,7 +414,7 @@ def load_controlnet(ckpt_path, model=None):
new_sd
[
diffusers_keys
[
k
]]
=
controlnet_data
.
pop
(
k
)
new_sd
[
diffusers_keys
[
k
]]
=
controlnet_data
.
pop
(
k
)
if
"control_add_embedding.linear_1.bias"
in
controlnet_data
:
#Union Controlnet
if
"control_add_embedding.linear_1.bias"
in
controlnet_data
:
#Union Controlnet
controlnet_config
[
"union_controlnet
"
]
=
True
controlnet_config
[
"union_controlnet
_num_control_type"
]
=
controlnet_data
[
"task_embedding"
].
shape
[
0
]
for
k
in
list
(
controlnet_data
.
keys
()):
for
k
in
list
(
controlnet_data
.
keys
()):
new_k
=
k
.
replace
(
'.attn.in_proj_'
,
'.attn.in_proj.'
)
new_k
=
k
.
replace
(
'.attn.in_proj_'
,
'.attn.in_proj.'
)
new_sd
[
new_k
]
=
controlnet_data
.
pop
(
k
)
new_sd
[
new_k
]
=
controlnet_data
.
pop
(
k
)
...
...
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