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
0a4c49c5
Commit
0a4c49c5
authored
Jul 23, 2024
by
comfyanonymous
Browse files
Support MT5.
parent
88ed8930
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/text_encoders/t5.py
comfy/text_encoders/t5.py
+1
-1
No files found.
comfy/text_encoders/t5.py
View file @
0a4c49c5
...
@@ -223,7 +223,7 @@ class T5(torch.nn.Module):
...
@@ -223,7 +223,7 @@ class T5(torch.nn.Module):
self
.
num_layers
=
config_dict
[
"num_layers"
]
self
.
num_layers
=
config_dict
[
"num_layers"
]
model_dim
=
config_dict
[
"d_model"
]
model_dim
=
config_dict
[
"d_model"
]
self
.
encoder
=
T5Stack
(
self
.
num_layers
,
model_dim
,
model_dim
,
config_dict
[
"d_ff"
],
config_dict
[
"dense_act_fn"
],
config_dict
[
"is_gated_act"
],
config_dict
[
"num_heads"
],
config_dict
[
"model_type"
]
=
=
"t5"
,
dtype
,
device
,
operations
)
self
.
encoder
=
T5Stack
(
self
.
num_layers
,
model_dim
,
model_dim
,
config_dict
[
"d_ff"
],
config_dict
[
"dense_act_fn"
],
config_dict
[
"is_gated_act"
],
config_dict
[
"num_heads"
],
config_dict
[
"model_type"
]
!
=
"
um
t5"
,
dtype
,
device
,
operations
)
self
.
dtype
=
dtype
self
.
dtype
=
dtype
self
.
shared
=
torch
.
nn
.
Embedding
(
config_dict
[
"vocab_size"
],
model_dim
,
device
=
device
)
self
.
shared
=
torch
.
nn
.
Embedding
(
config_dict
[
"vocab_size"
],
model_dim
,
device
=
device
)
...
...
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