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
ca7c310a
Commit
ca7c310a
authored
Feb 25, 2024
by
comfyanonymous
Browse files
Support loading old CLIP models saved with CLIPSave.
parent
8d7910ce
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 @
ca7c310a
...
...
@@ -365,6 +365,9 @@ def load_clip(ckpt_paths, embedding_directory=None, clip_type=CLIPType.STABLE_DI
for
i
in
range
(
len
(
clip_data
)):
if
"transformer.resblocks.0.ln_1.weight"
in
clip_data
[
i
]:
clip_data
[
i
]
=
comfy
.
utils
.
clip_text_transformers_convert
(
clip_data
[
i
],
""
,
""
)
else
:
if
"text_projection"
in
clip_data
[
i
]:
clip_data
[
i
][
"text_projection.weight"
]
=
clip_data
[
i
][
"text_projection"
].
transpose
(
0
,
1
)
#old models saved with the CLIPSave node
clip_target
=
EmptyClass
()
clip_target
.
params
=
{}
...
...
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