for test only
This commit is contained in:
@@ -213,9 +213,12 @@ class MultiModalChatDataCollator(DataCollatorMixin):
|
|||||||
for example in examples
|
for example in examples
|
||||||
]
|
]
|
||||||
|
|
||||||
if chat_template_type == "llava":
|
if chat_template_type != "llava":
|
||||||
max_images = 1
|
images = __class__.process_images(examples, max_images=max_images)
|
||||||
images = __class__.process_images(examples, max_images=max_images)
|
else:
|
||||||
|
# LLava1.5 does not support multiple images
|
||||||
|
images = [example["images"] for example in examples]
|
||||||
|
images = [image[0] for image in images]
|
||||||
|
|
||||||
# Tokenize the texts and process the images
|
# Tokenize the texts and process the images
|
||||||
batch = processor(text=texts, images=images, return_tensors="pt", padding=True)
|
batch = processor(text=texts, images=images, return_tensors="pt", padding=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user