lmstudio-ai / lmstudio-ai/lmstudio-python

Models go MAD when ByteIO image is passed

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
875
Forks
166
PR merge metrics
No merged PRs in 30d

Description

As per description the models go completely mad when an image is passed as ByteIO to the prepare_image method, the solution is to add a name explicitly to the image like:
image_handle = lms.prepare_image(io.BytesIO(image_data), name="image.png")

please add it to your documentation or fix it i lost over 20 minutes to understand the madman behavior the vLLM was showing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the prepare_image API entry point and reproduce the reported behavior with io.BytesIO(image_data), comparing it with the explicit name="image.png" example. Done means the unnamed ByteIO case is fixed or the required name is clearly documented so image preparation no longer produces unexpected model behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.