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
d3f59982
"...git@developer.sourcefind.cn:modelzoo/diffbir_pytorch.git" did not exist on "75af805bcb46bfa31dd2daea42fddc6fa21e7a73"
Commit
d3f59982
authored
Jul 09, 2023
by
comfyanonymous
Browse files
Support loading clip_g from diffusers in CLIP Loader nodes.
parent
a9a4ba75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
comfy/sdxl_clip.py
comfy/sdxl_clip.py
+2
-0
No files found.
comfy/sdxl_clip.py
View file @
d3f59982
...
@@ -35,6 +35,8 @@ class SDXLClipG(sd1_clip.SD1ClipModel):
...
@@ -35,6 +35,8 @@ class SDXLClipG(sd1_clip.SD1ClipModel):
def
load_sd
(
self
,
sd
):
def
load_sd
(
self
,
sd
):
if
"text_projection"
in
sd
:
if
"text_projection"
in
sd
:
self
.
text_projection
[:]
=
sd
.
pop
(
"text_projection"
)
self
.
text_projection
[:]
=
sd
.
pop
(
"text_projection"
)
if
"text_projection.weight"
in
sd
:
self
.
text_projection
[:]
=
sd
.
pop
(
"text_projection.weight"
).
transpose
(
0
,
1
)
return
super
().
load_sd
(
sd
)
return
super
().
load_sd
(
sd
)
class
SDXLClipGTokenizer
(
sd1_clip
.
SD1Tokenizer
):
class
SDXLClipGTokenizer
(
sd1_clip
.
SD1Tokenizer
):
...
...
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