it's Friday night, let cross finger

This commit is contained in:
ydshieh 2024-12-13 18:29:22 +01:00
parent ce3a6b0ab7
commit 90c4fcc29c

View file

@ -126,7 +126,7 @@ class Kosmos2_5Processor(ProcessorMixin):
text = [prompt + text]
else:
text = [prompt + t for t in text]
input = self.tokenizer(text, **output_kwargs["text_kwargs"], **output_kwargs["common_kwargs"])
input = self.tokenizer(text, **output_kwargs["text_kwargs"])
batch_size, seq_len = input.input_ids.shape
image_embeds_position_mask = [0, -1] + [1] * num_image_tokens + [-1]