Skip to content

Conversation

zyddnys
Copy link
Contributor

@zyddnys zyddnys commented Oct 1, 2024

Since input is PIL image, the input data format is always channels last, this PR prevents transformers from inferring image format and thus fix #8954

Copy link

github-actions bot commented Oct 1, 2024

👋 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 starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

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

🚀

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@DarkLight1337
Copy link
Member

Please run format.sh to fix the lint errors.

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

After some offline discussion with @alex-jw-brooks, I just remembered that the input mapper for MiniCPM-V has been changed to a custom one in #8250, so this fix doesn't actually work for that model.

Moreover, not all image processors accept data_format="channels_last" as a keyword argument, so this change may break other models as well. To avoid this, I suggest using inspect.get_signature or something like that to only pass in data_format if it's indeed supported by the processor. For MiniCPM-V though, their image mapper doesn't support data_format, so you'll have to ask HF side to add this first.

@sfyumi
Copy link

sfyumi commented Oct 8, 2024

How can i do to just workaround it for MiniCPM-V?

@DarkLight1337
Copy link
Member

DarkLight1337 commented Oct 8, 2024

How can i do to just workaround it for MiniCPM-V?

I suggest you validate the images before sending them into vLLM engine.

@zyddnys zyddnys closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: minicpmv crash on 1x1 image
3 participants