Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentence_transformers/models/CLIPModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def tokenize(self, texts, padding: str | bool = True) -> dict[str, torch.Tensor]

encoding = {}
if len(texts_values):
encoding = self.processor.tokenizer(texts_values, return_tensors="pt", padding=padding)
encoding = self.processor.tokenizer(texts_values, padding=padding, truncation=True, return_tensors="pt")

if len(images):
image_features = self.processor.image_processor(images, return_tensors="pt")
Expand Down
Loading