[Bugfix] Fix simple Mistral-Small example (#36156)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -7,6 +7,7 @@ import argparse
|
|||||||
from vllm import LLM
|
from vllm import LLM
|
||||||
from vllm.sampling_params import SamplingParams
|
from vllm.sampling_params import SamplingParams
|
||||||
from vllm.assets.image import ImageAsset
|
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
|
# This script is an offline demo for running Mistral-Small-3.1
|
||||||
#
|
#
|
||||||
@@ -79,8 +80,10 @@ def run_simple_demo(args: argparse.Namespace):
|
|||||||
"content": [
|
"content": [
|
||||||
{"type": "text", "text": prompt},
|
{"type": "text", "text": prompt},
|
||||||
{
|
{
|
||||||
"type": "image_pil",
|
"type": "image_url",
|
||||||
"image_pil": ImageAsset("cherry_blossom").pil_image,
|
"image_url": {
|
||||||
|
"url": encode_image_url(ImageAsset("cherry_blossom").pil_image)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user