From de00ebeac4abddafff9f23bb598a6619b5892261 Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Fri, 6 Mar 2026 12:25:11 +0800 Subject: [PATCH] [Bugfix] Fix simple Mistral-Small example (#36156) Signed-off-by: DarkLight1337 --- examples/offline_inference/mistral-small.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/offline_inference/mistral-small.py b/examples/offline_inference/mistral-small.py index 0879b0dfa..b48cef72b 100644 --- a/examples/offline_inference/mistral-small.py +++ b/examples/offline_inference/mistral-small.py @@ -7,6 +7,7 @@ import argparse from vllm import LLM from vllm.sampling_params import SamplingParams from vllm.assets.image import ImageAsset +from vllm.multimodal.utils import encode_image_url # This script is an offline demo for running Mistral-Small-3.1 # @@ -79,8 +80,10 @@ def run_simple_demo(args: argparse.Namespace): "content": [ {"type": "text", "text": prompt}, { - "type": "image_pil", - "image_pil": ImageAsset("cherry_blossom").pil_image, + "type": "image_url", + "image_url": { + "url": encode_image_url(ImageAsset("cherry_blossom").pil_image) + }, }, ], },