Skip to content

Commit ac128f7

Browse files
authored
Update t5.py (#119)
Subtle bug in text encoding. Doesn't pop up until using a different encoder model with embedding dims that don't match the base model. Code is currently instantiating an entirely new T5 model of 'DEFAULT_T5_NAME' irregardless of what was passed in if name != DEFAULT_T5_NAME.
1 parent 1cad16a commit ac128f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: imagen_pytorch/t5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def t5_encode_text(
110110
return_attn_mask = False
111111
):
112112
token_ids, attn_mask = t5_tokenize(texts, name = name)
113-
encoded_text = t5_encode_tokenized_text(token_ids, attn_mask = attn_mask)
113+
encoded_text = t5_encode_tokenized_text(token_ids, attn_mask = attn_mask, name = name)
114114

115115
if return_attn_mask:
116116
attn_mask = attn_mask.bool()

0 commit comments

Comments
 (0)