Skip to content

Failed to analyze image (analysis failure reported by model) #65

@Jaron-Wilson

Description

@Jaron-Wilson

I get this error when running via api or the python heres the 2 scripts segments:

# 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}
# 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions