-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[Bugfix] Missing thumbnail from NVLM-D processor #14633
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
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run 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 either: Add 🚀 |
Signed-off-by: ameyanjarlekar <[email protected]>
27aab39 to
b04f810
Compare
DarkLight1337
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing! @kylehh can you confirm this fix since I don't have the means to run this model locally right now.
|
I can reprod the issue w the shared image and the inference can run through w the bug fix. ( I didn't go through the whole logic of how |
|
Merged |
Signed-off-by: ameyanjarlekar <[email protected]> Signed-off-by: Richard Liu <[email protected]>
Signed-off-by: ameyanjarlekar <[email protected]> Signed-off-by: Louis Ulmer <[email protected]>
Signed-off-by: ameyanjarlekar <[email protected]>
Signed-off-by: ameyanjarlekar <[email protected]> Signed-off-by: Mu Huai <[email protected]>
If num_patches evaluate to 1 for the input image prompt, the existing code does not generate any image token leading to the error "Unable to allocate 256 multimodal tokens to 0 placeholders". For images of particular dimensions eg. 220x229 or 200x229, I received this error.
The code currently breaks the input image prompt into multiple images by cropping certain parts of the image. It then appends all these cropped images plus a thumbnail image which is the resized version of the original image into a list. The number of elements in this list is dependent on the num_patches variable which is calculated based on the size of the original image.
If the num_patches variable is 1, then the code currently does not crop the image and also doesn't add the thumbnail image, therefore adding 0 image placeholders. Therefore, to consider the thumbnail image, which is the original image when num_patches==1 we need to remove the condition num_patches != 1.
To reproduce the bug you can try giving a prompt with this image (https://github.com/user-attachments/assets/7cd2df26-c765-43d8-bab2-9783d33c792f).