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
36e76700
Unverified
Commit
36e76700
authored
Dec 31, 2024
by
whyiug
Committed by
GitHub
Dec 30, 2024
Browse files
[Bugfix] Validate and concatenate image embeddings in MiniCPMVBaseModel (#11631)
parent
5886aa49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/model_executor/models/minicpmv.py
vllm/model_executor/models/minicpmv.py
+6
-0
No files found.
vllm/model_executor/models/minicpmv.py
View file @
36e76700
...
...
@@ -487,6 +487,12 @@ class MiniCPMVBaseModel(nn.Module, SupportsMultiModal, SupportsPP):
image_embeds
=
kwargs
.
pop
(
"image_embeds"
,
None
)
if
image_embeds
is
not
None
:
if
not
isinstance
(
image_embeds
,
(
torch
.
Tensor
,
list
)):
raise
ValueError
(
f
"Incorrect type of image embeds. "
f
"Got type:
{
type
(
image_embeds
)
}
"
)
if
isinstance
(
image_embeds
,
list
):
image_embeds
=
torch
.
concat
(
image_embeds
)
return
MiniCPMVImageEmbeddingInputs
(
image_bounds
=
self
.
_get_image_bounds
(
input_ids
,
im_start_id
,
im_end_id
,
slice_start_id
,
...
...
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