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
da7a8df0
Commit
da7a8df0
authored
Jan 30, 2024
by
comfyanonymous
Browse files
Put VAE key name in model config.
parent
ed2fa105
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
comfy/sd.py
comfy/sd.py
+1
-1
comfy/supported_models_base.py
comfy/supported_models_base.py
+1
-0
No files found.
comfy/sd.py
View file @
da7a8df0
...
@@ -462,7 +462,7 @@ def load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, o
...
@@ -462,7 +462,7 @@ def load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, o
model
.
load_model_weights
(
sd
,
"model.diffusion_model."
)
model
.
load_model_weights
(
sd
,
"model.diffusion_model."
)
if
output_vae
:
if
output_vae
:
vae_sd
=
comfy
.
utils
.
state_dict_prefix_replace
(
sd
,
{
"first_stage_model."
:
""
},
filter_keys
=
True
)
vae_sd
=
comfy
.
utils
.
state_dict_prefix_replace
(
sd
,
{
k
:
""
for
k
in
model_config
.
vae_key_prefix
},
filter_keys
=
True
)
vae_sd
=
model_config
.
process_vae_state_dict
(
vae_sd
)
vae_sd
=
model_config
.
process_vae_state_dict
(
vae_sd
)
vae
=
VAE
(
sd
=
vae_sd
)
vae
=
VAE
(
sd
=
vae_sd
)
...
...
comfy/supported_models_base.py
View file @
da7a8df0
...
@@ -21,6 +21,7 @@ class BASE:
...
@@ -21,6 +21,7 @@ class BASE:
noise_aug_config
=
None
noise_aug_config
=
None
sampling_settings
=
{}
sampling_settings
=
{}
latent_format
=
latent_formats
.
LatentFormat
latent_format
=
latent_formats
.
LatentFormat
vae_key_prefix
=
[
"first_stage_model."
]
manual_cast_dtype
=
None
manual_cast_dtype
=
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