lmstudio-ai / lmstudio-ai/lmstudio-python
Failed to analyze image (analysis failure reported by model)
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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