Skip to content

[Bugfix][VLM] Fix incompatibility between #7902 and #7230 #7948

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

Merged
merged 8 commits into from
Aug 28, 2024
Merged

[Bugfix][VLM] Fix incompatibility between #7902 and #7230 #7948

merged 8 commits into from
Aug 28, 2024

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Aug 28, 2024

This PR fixes an incompatibility between multimodal tensor stacking and multi-image support in LLaVA-NeXT and InternVL which causes the VLM CI to fail.

It also updates the docstrings about the input shapes which have become outdated since #7230.

The issue failed to be caught in #7902 because the changes from #7230 were not merged into its feature branch prior to merging #7902.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

@DarkLight1337 DarkLight1337 changed the title [Bugfix] Fix incompatibility between #7902 and #7230 [Bugfix][VLM] Fix incompatibility between #7902 and #7230 Aug 28, 2024
@DarkLight1337 DarkLight1337 requested a review from ywang96 August 28, 2024 09:11
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 28, 2024
Comment on lines +515 to +527
expected_dims = (2, )

def _validate_shape(d: torch.Tensor):
actual_dims = tuple(d.shape)

if actual_dims != expected_dims:
expected_expr = str(expected_dims)
raise ValueError(
f"The expected shape of image sizes per image per batch "
f"is {expected_expr}. You supplied {tuple(d.shape)}.")

for d in data:
_validate_shape(d)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is more complex, the error message becomes consistent with the one for pixel_values.

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the fix!

@ywang96 ywang96 merged commit ef9baee into vllm-project:main Aug 28, 2024
37 checks passed
@DarkLight1337 DarkLight1337 deleted the llava-next-stack branch August 28, 2024 15:22
@zifeitong
Copy link
Contributor

Thanks for the fix!

@petersalas
Copy link
Contributor

Thank you for the fix! Sorry about that.

Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
LeiWang1999 pushed a commit to LeiWang1999/vllm-bitblas that referenced this pull request Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants