Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Validate and concatenate image embeddings in MiniCPMVBaseModel #11631

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Model] Fix type validation for image embeddings in MiniCPMVBaseModel
  • Loading branch information
whyiug committed Dec 30, 2024
commit b2ff89394c12145d872328c29a803d08097b233d
4 changes: 2 additions & 2 deletions vllm/model_executor/models/minicpmv.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@ def _parse_and_validate_inputs(
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)}")
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,
Expand Down
Loading