-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Bug]: Issue Running LLaVA with vLLM Due to Tensor Size Mismatch #4421
Comments
The image should have size |
I have the same error even if I change the size. |
You should ensure that the image that is actually inputted into the model also has this size (i.e. not only change the config). In the future, we will add image preprocessing to vLLM to make this step no longer necessary. |
Yes, the images have the same size but I get the same error. |
To better pinpoint the issue, can you show the stack trace of the error? |
It's working now, I'm using this code, which can process any image format:
But I have a question: has LLaVA 1.6 been processed by vLLM yet, or not? |
It's not supported yet. We are working on it though! |
Thank you for the information! I have one other question: how can I specify the number of tokens to generate and the temperature with vLLM in this code? |
You can pass |
Btw, if you absolutely must use LLaVA-1.6, I have a fork in #4199 which adds experimental support for it. |
Your current environment
🐛 Describe the bug
I'm attempting to integrate LLaVA with vLLM for image processing, but I'm encountering a tensor size mismatch error when executing my script.
Setup:
I installed vLLM along with other required packages using the following command:
!pip install vllm==0.4.1 kaleido python-multipart torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1
Code:
Here's the script I used to run LLaVA:
Error:
Upon running this script, I receive the following error:
RuntimeError: The size of tensor a (257) must match the size of tensor b (577) at non-singleton dimension 1.
Could anyone assist in identifying the source of this issue and suggest how I might correct the tensor size mismatch? Any help or suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: