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

chore: Update vllm_engine.py to support vllm version >= 0.5.1 #4706

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

T-Atlas
Copy link
Contributor

@T-Atlas T-Atlas commented Jul 7, 2024

What does this PR do?

Minimizes modifications to adapt to changes in vllm version 0.5.1 and later (regarding vllm-project/vllm#5852).

Fixes addresses the error encountered when starting the web UI:

vllm_engine.py, line 33, in <module>
    from vllm.multimodal.image import ImagePixelData
ImportError: cannot import name 'ImagePixelData' from 'vllm.multimodal.image'

Specific Changes Made

  • File: vllm_engine.py
    • Updated the import statement for ImagePixelData to handle changes in vllm version 0.5.1 and later.
    • Introduced a conditional import to ensure compatibility with versions greater than 0.5.1 and 0.5.0.
    • Updated the logic to handle ImagePixelData and MultiModalData correctly based on the vllm version.

Before submitting

Copy link
Owner

@hiyouga hiyouga left a comment

Choose a reason for hiding this comment

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

LGTM!

@hiyouga hiyouga merged commit 563a27d into hiyouga:main Jul 7, 2024
1 check passed
@hiyouga hiyouga added the solved This problem has been already solved label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants