Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8b6725b0
Unverified
Commit
8b6725b0
authored
Nov 16, 2024
by
Jaehyun An
Committed by
GitHub
Nov 16, 2024
Browse files
[Misc] Update benchmark to support image_url file or http (#10287)
Signed-off-by:
rbbang
<
anjaehyun87@gmail.com
>
parent
1d754726
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
benchmarks/benchmark_serving.py
benchmarks/benchmark_serving.py
+13
-0
No files found.
benchmarks/benchmark_serving.py
View file @
8b6725b0
...
...
@@ -251,6 +251,19 @@ def sample_hf_requests(
"url"
:
f
"data:image/jpeg;base64,
{
image_base64
}
"
},
}
elif
"image"
in
data
and
isinstance
(
data
[
"image"
],
str
):
if
(
data
[
"image"
].
startswith
(
"http://"
)
or
\
data
[
"image"
].
startswith
(
"file://"
)):
image_url
=
data
[
"image"
]
else
:
image_url
=
f
"file://
{
data
[
'image'
]
}
"
mm_content
=
{
"type"
:
"image_url"
,
"image_url"
:
{
"url"
:
image_url
},
}
else
:
mm_content
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment