Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
5752f25e
"tests/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "b2dc520210621f526c7d44c17c9d855e38ac1df8"
Unverified
Commit
5752f25e
authored
Sep 18, 2024
by
Xiao Yu
Committed by
GitHub
Sep 18, 2024
Browse files
Fixed n>1 causing list index out of range with VLM (#1449)
parent
7c162fa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
python/sglang/srt/managers/io_struct.py
python/sglang/srt/managers/io_struct.py
+3
-0
No files found.
python/sglang/srt/managers/io_struct.py
View file @
5752f25e
...
@@ -133,6 +133,9 @@ class GenerateReqInput:
...
@@ -133,6 +133,9 @@ class GenerateReqInput:
self
.
image_data
=
[
None
]
*
num
self
.
image_data
=
[
None
]
*
num
elif
not
isinstance
(
self
.
image_data
,
list
):
elif
not
isinstance
(
self
.
image_data
,
list
):
self
.
image_data
=
[
self
.
image_data
]
*
num
self
.
image_data
=
[
self
.
image_data
]
*
num
elif
isinstance
(
self
.
image_data
,
list
):
# multi-image with n > 1
self
.
image_data
=
self
.
image_data
*
num
if
self
.
sampling_params
is
None
:
if
self
.
sampling_params
is
None
:
self
.
sampling_params
=
[{}]
*
num
self
.
sampling_params
=
[{}]
*
num
...
...
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