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
2c4e92a9
Commit
2c4e92a9
authored
Jan 02, 2024
by
comfyanonymous
Browse files
Fix regression.
parent
5eddfdd8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
comfy/model_detection.py
comfy/model_detection.py
+6
-1
No files found.
comfy/model_detection.py
View file @
2c4e92a9
...
...
@@ -48,7 +48,12 @@ def detect_unet_config(state_dict, key_prefix, dtype):
unet_config
[
"dtype"
]
=
dtype
model_channels
=
state_dict
[
'{}input_blocks.0.0.weight'
.
format
(
key_prefix
)].
shape
[
0
]
in_channels
=
state_dict
[
'{}input_blocks.0.0.weight'
.
format
(
key_prefix
)].
shape
[
1
]
out_channels
=
state_dict
[
'{}out.2.weight'
.
format
(
key_prefix
)].
shape
[
0
]
out_key
=
'{}out.2.weight'
.
format
(
key_prefix
)
if
out_key
in
state_dict
:
out_channels
=
state_dict
[
out_key
].
shape
[
0
]
else
:
out_channels
=
4
num_res_blocks
=
[]
channel_mult
=
[]
...
...
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