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
40404911
Commit
40404911
authored
Jul 06, 2024
by
comfyanonymous
Browse files
Better T5xxl detection.
parent
b8e58a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
comfy/sd.py
comfy/sd.py
+5
-3
No files found.
comfy/sd.py
View file @
40404911
...
...
@@ -432,9 +432,11 @@ def load_clip(ckpt_paths, embedding_directory=None, clip_type=CLIPType.STABLE_DI
clip_target
.
clip
=
sd2_clip
.
SD2ClipModel
clip_target
.
tokenizer
=
sd2_clip
.
SD2Tokenizer
elif
"encoder.block.23.layer.1.DenseReluDense.wi_1.weight"
in
clip_data
[
0
]:
dtype_t5
=
clip_data
[
0
][
"encoder.block.23.layer.1.DenseReluDense.wi_1.weight"
].
dtype
clip_target
.
clip
=
sd3_clip
.
sd3_clip
(
clip_l
=
False
,
clip_g
=
False
,
t5
=
True
,
dtype_t5
=
dtype_t5
)
clip_target
.
tokenizer
=
sd3_clip
.
SD3Tokenizer
weight
=
clip_data
[
0
][
"encoder.block.23.layer.1.DenseReluDense.wi_1.weight"
]
dtype_t5
=
weight
.
dtype
if
weight
.
shape
[
-
1
]
==
4096
:
clip_target
.
clip
=
sd3_clip
.
sd3_clip
(
clip_l
=
False
,
clip_g
=
False
,
t5
=
True
,
dtype_t5
=
dtype_t5
)
clip_target
.
tokenizer
=
sd3_clip
.
SD3Tokenizer
elif
"encoder.block.0.layer.0.SelfAttention.k.weight"
in
clip_data
[
0
]:
clip_target
.
clip
=
sa_t5
.
SAT5Model
clip_target
.
tokenizer
=
sa_t5
.
SAT5Tokenizer
...
...
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