lmstudio-ai / lmstudio-ai/lmstudio-python

Failed to analyze image (analysis failure reported by model)

Open
#65 15 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

I get this error when running via api or the python heres the 2 scripts segments:
```python
# Prepare the image using lmstudio
with lms.Client() as client:
# Prepare the image for analysis
image_handle = client.files.prepare_image(image_path)
model = client.llm.model("qwen2-vl-2b-instruct")
chat = lms.Chat()
chat.add_user_message("Describe this image please", images=[image_handle])
prediction = model.respond(chat)
return {"status": "success", "response": prediction.text}
```
```python
# image_handle = lms.prepare_image(image_path)

# # Load the model
# model = lms.llm("qwen2-vl-2b-instruct")

# # Create a chat instance and add the user message with the image
# chat = lms.Chat()
# chat.add_user_message("Describe this image please", images=[image_handle])

# # Get the model's response
# prediction = model.respond(chat)
```
I got these off of the api and python script, so i dont know why it does not work anymore?

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 with the two Python snippets in the issue and reproduce the image-analysis request through both the API and Python paths. Capture the complete error output and compare the current image preparation, model loading, and response steps; done means identifying why the request reports an analysis failure and confirming a successful image description.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.