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
9b560c3e
"tests/vscode:/vscode.git/clone" did not exist on "82295dbf056c74501bb4470202dd4ad1e4e8e277"
Unverified
Commit
9b560c3e
authored
Jul 15, 2025
by
杨睿
Committed by
GitHub
Jul 15, 2025
Browse files
fix: modality length mismatch with image_data (#7887)
parent
5dc5866e
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 @
9b560c3e
...
...
@@ -297,6 +297,9 @@ class GenerateReqInput:
self
.
modalities
.
append
(
"image"
)
elif
len
(
self
.
image_data
[
i
])
>
1
:
self
.
modalities
.
append
(
"multi-images"
)
else
:
# Ensure len(self.modalities) == len(self.image_data)
self
.
modalities
.
append
(
None
)
# Expand parallel_sample_num
self
.
image_data
=
self
.
image_data
*
self
.
parallel_sample_num
self
.
modalities
=
self
.
modalities
*
self
.
parallel_sample_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