fix: Properly determine seq_len for TextTransformer processing

This commit is contained in:
Michael Poutre
2023-11-18 23:04:56 -08:00
parent 2fa1b95045
commit 0de2ab3f9a
+1 -2
View File
@@ -193,8 +193,7 @@ class PrompLangCLIPTextTransformer(CLIPTextTransformer):
hidden_states = self.embeddings(input_dicts=input_ids)
bsz = len(input_ids)
# TODO: Properly gather this
seq_len = 77
seq_len = hidden_states.shape[1]
causal_attention_mask, attention_mask = self.process_attention_mask(hidden_states, attention_mask, bsz, seq_len)