fix: Handle EOT as well as __PAD__ segments for pooler output EOT calc
This commit is contained in:
@@ -219,7 +219,7 @@ class PrompLangCLIPTextTransformer(CLIPTextTransformer):
|
||||
if isinstance(seg_or_action, Action):
|
||||
idx += seg_or_action.token_length()
|
||||
else:
|
||||
if seg_or_action.text == '__PAD__':
|
||||
if seg_or_action.text == "__PAD__" or seg_or_action.text == "[EOT]":
|
||||
break
|
||||
|
||||
# Is a segment, and isn't the pad segment
|
||||
|
||||
Reference in New Issue
Block a user