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
71713888
Commit
71713888
authored
Sep 28, 2023
by
comfyanonymous
Browse files
Print missing VAE keys.
parent
76e0f8fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
comfy/sd.py
comfy/sd.py
+3
-1
No files found.
comfy/sd.py
View file @
71713888
...
@@ -152,7 +152,9 @@ class VAE:
...
@@ -152,7 +152,9 @@ class VAE:
sd
=
comfy
.
utils
.
load_torch_file
(
ckpt_path
)
sd
=
comfy
.
utils
.
load_torch_file
(
ckpt_path
)
if
'decoder.up_blocks.0.resnets.0.norm1.weight'
in
sd
.
keys
():
#diffusers format
if
'decoder.up_blocks.0.resnets.0.norm1.weight'
in
sd
.
keys
():
#diffusers format
sd
=
diffusers_convert
.
convert_vae_state_dict
(
sd
)
sd
=
diffusers_convert
.
convert_vae_state_dict
(
sd
)
self
.
first_stage_model
.
load_state_dict
(
sd
,
strict
=
False
)
m
,
u
=
self
.
first_stage_model
.
load_state_dict
(
sd
,
strict
=
False
)
if
len
(
m
)
>
0
:
print
(
"Missing VAE keys"
,
m
)
if
device
is
None
:
if
device
is
None
:
device
=
model_management
.
vae_device
()
device
=
model_management
.
vae_device
()
...
...
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