Fixing integration tests ? (Failures locally).

This commit is contained in:
Nicolas Patry 2024-04-05 18:06:04 +00:00
parent 7852a85b57
commit ccbfc05db5

View File

@ -113,6 +113,7 @@ class VlmCausalLMBatch(FlashMistralBatch):
full_text += chunk["content"] full_text += chunk["content"]
elif chunk["type"] == "image": elif chunk["type"] == "image":
image = chunk["content"] image = chunk["content"]
if image.startswith("https://") or image.startswith("http://"):
image = processor.image_processor.fetch_images(image) image = processor.image_processor.fetch_images(image)
image_input = processor.image_processor(image, return_tensors="pt") image_input = processor.image_processor(image, return_tensors="pt")
height, width = image_input["image_sizes"][0] height, width = image_input["image_sizes"][0]