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
4f9b6f39
Commit
4f9b6f39
authored
Jul 25, 2023
by
comfyanonymous
Browse files
Fix potential issue with Save Checkpoint.
parent
7c0a5a3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
comfy/supported_models.py
comfy/supported_models.py
+4
-2
No files found.
comfy/supported_models.py
View file @
4f9b6f39
...
...
@@ -126,6 +126,7 @@ class SDXLRefiner(supported_models_base.BASE):
def
process_clip_state_dict_for_saving
(
self
,
state_dict
):
replace_prefix
=
{}
state_dict_g
=
diffusers_convert
.
convert_text_enc_state_dict_v20
(
state_dict
,
"clip_g"
)
if
"clip_g.transformer.text_model.embeddings.position_ids"
in
state_dict_g
:
state_dict_g
.
pop
(
"clip_g.transformer.text_model.embeddings.position_ids"
)
replace_prefix
[
"clip_g"
]
=
"conditioner.embedders.0.model"
state_dict_g
=
supported_models_base
.
state_dict_prefix_replace
(
state_dict_g
,
replace_prefix
)
...
...
@@ -171,6 +172,7 @@ class SDXL(supported_models_base.BASE):
replace_prefix
=
{}
keys_to_replace
=
{}
state_dict_g
=
diffusers_convert
.
convert_text_enc_state_dict_v20
(
state_dict
,
"clip_g"
)
if
"clip_g.transformer.text_model.embeddings.position_ids"
in
state_dict_g
:
state_dict_g
.
pop
(
"clip_g.transformer.text_model.embeddings.position_ids"
)
for
k
in
state_dict
:
if
k
.
startswith
(
"clip_l"
):
...
...
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