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
0a6fd49a
Commit
0a6fd49a
authored
Nov 07, 2023
by
comfyanonymous
Browse files
Print leftover keys when using the UNETLoader.
parent
fe40109b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
comfy/sd.py
comfy/sd.py
+3
-0
No files found.
comfy/sd.py
View file @
0a6fd49a
...
...
@@ -496,6 +496,9 @@ def load_unet(unet_path): #load unet in diffusers format
model
=
model_config
.
get_model
(
new_sd
,
""
)
model
=
model
.
to
(
offload_device
)
model
.
load_model_weights
(
new_sd
,
""
)
left_over
=
sd
.
keys
()
if
len
(
left_over
)
>
0
:
print
(
"left over keys in unet:"
,
left_over
)
return
comfy
.
model_patcher
.
ModelPatcher
(
model
,
load_device
=
model_management
.
get_torch_device
(),
offload_device
=
offload_device
)
def
save_checkpoint
(
output_path
,
model
,
clip
,
vae
,
metadata
=
None
):
...
...
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