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

fix vllm base64 image inference #815

Merged
merged 3 commits into from
Jan 18, 2025
Merged

fix vllm base64 image inference #815

merged 3 commits into from
Jan 18, 2025

Conversation

yanxi0830
Copy link
Contributor

@yanxi0830 yanxi0830 commented Jan 18, 2025

What does this PR do?

Test Plan

LLAMA_STACK_BASE_URL=http://localhost:8321 pytest -v ./tests/client-sdk/inference/test_inference.py::test_image_chat_completion_base64_url
image

Sources

Please link relevant resources if necessary.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Ran pre-commit to handle lint / formatting issues.
  • Read the contributor guideline,
    Pull Request section?
  • Updated relevant documentation.
  • Wrote necessary unit or integration tests.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 18, 2025
@yanxi0830 yanxi0830 marked this pull request as ready for review January 18, 2025 00:18
@@ -176,10 +176,8 @@ async def _get_params(
media_present = request_has_media(request)
if isinstance(request, ChatCompletionRequest):
if media_present:
# vllm does not seem to work well with image urls, so we download the images
Copy link
Contributor Author

Choose a reason for hiding this comment

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

vllm works now w/ base64 image urls

@yanxi0830 yanxi0830 merged commit 3e7496e into main Jan 18, 2025
2 checks passed
@yanxi0830 yanxi0830 deleted the fix-vllm-base64 branch January 18, 2025 01:07
@yanxi0830 yanxi0830 restored the fix-vllm-base64 branch January 18, 2025 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants