moondream icon indicating copy to clipboard operation
moondream copied to clipboard

Guide me to Run it locally, please.

Open PrasanthChowhan opened this issue 1 year ago • 4 comments

I found out about this model through comfy ui, the captioning of this model blew me. I want to run this model with my python script and without a comfyui interface. how can I go about it?

Things I have tried:

  • cloned this repository and runned sample.py It throws the following error image

PrasanthChowhan avatar Feb 23 '24 10:02 PrasanthChowhan

hi see this standalone example I made for using Llava models https://github.com/sujitvasanth/TinyLlava-Tk there is a further moondreamTk.py in the repository that does the same for moondream model. A video demonstration of the Llava inference is included. I chose Tk above gradio as it gives full control of any opencv manipulations

sujitvasanth avatar Feb 23 '24 23:02 sujitvasanth

@PrasanthChowhan Can you provide more details?

Vishnuxx avatar Feb 27 '24 11:02 Vishnuxx

@PrasanthChowhan I had the same issue. Installing the requirements from this repository (pip install -r requirements.txt) fixed the issue for me, which I think was being caused by the version of my transformers library.

gooselord-0 avatar Mar 06 '24 01:03 gooselord-0

Just as a FYI, the requirements.txt file requires running with Python 3.11 or lower. Attempt to install the requirements with Python 3.12 will fail as torch 2.1.2 isn't compatible with Python 3.12.

Morac2 avatar May 10 '24 16:05 Morac2