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
cacb022c
"vscode:/vscode.git/clone" did not exist on "7c6000e412288ddce7d0dbc4f4d9a12f49d28690"
Commit
cacb022c
authored
Mar 18, 2024
by
comfyanonymous
Browse files
Make saved SD1 checkpoints match more closely the official one.
parent
d3406d8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
comfy/supported_models.py
comfy/supported_models.py
+5
-0
No files found.
comfy/supported_models.py
View file @
cacb022c
...
@@ -45,6 +45,11 @@ class SD15(supported_models_base.BASE):
...
@@ -45,6 +45,11 @@ class SD15(supported_models_base.BASE):
return
state_dict
return
state_dict
def
process_clip_state_dict_for_saving
(
self
,
state_dict
):
def
process_clip_state_dict_for_saving
(
self
,
state_dict
):
pop_keys
=
[
"clip_l.transformer.text_projection.weight"
,
"clip_l.logit_scale"
]
for
p
in
pop_keys
:
if
p
in
state_dict
:
state_dict
.
pop
(
p
)
replace_prefix
=
{
"clip_l."
:
"cond_stage_model."
}
replace_prefix
=
{
"clip_l."
:
"cond_stage_model."
}
return
utils
.
state_dict_prefix_replace
(
state_dict
,
replace_prefix
)
return
utils
.
state_dict_prefix_replace
(
state_dict
,
replace_prefix
)
...
...
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