We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d75472 commit 8b6725bCopy full SHA for 8b6725b
benchmarks/benchmark_serving.py
@@ -251,6 +251,19 @@ def sample_hf_requests(
251
"url": f"data:image/jpeg;base64,{image_base64}"
252
},
253
}
254
+ elif "image" in data and isinstance(data["image"], str):
255
+ if (data["image"].startswith("http://") or \
256
+ data["image"].startswith("file://")):
257
+ image_url = data["image"]
258
+ else:
259
+ image_url = f"file://{data['image']}"
260
+
261
+ mm_content = {
262
+ "type": "image_url",
263
+ "image_url": {
264
+ "url": image_url
265
+ },
266
+ }
267
else:
268
mm_content = None
269
0 commit comments