Hangover3832 / ComfyUI-Hangover-Moondream

Moondream is a lightweight multimodal large language model
https://github.com/Hangover3832/ComfyUI-Hangover-Moondream
Apache License 2.0
37 stars 5 forks source link

Question: pre-existing copy of the model. #15

Closed caniyabanci76 closed 2 months ago

caniyabanci76 commented 2 months ago

Not a bug, but a question. If I already have a local copy of the moondream model, what do i need to change to make it point to that instead of the cached version that it tries to download?

Hangover3832 commented 2 months ago

What you can try is to place all the files into ConfyUI/models/moondream2 and change the following code:

124:                self.model = AutoModel.from_pretrained(
125:                    "ComfyUI/models/moondream2", 
126:                    trust_remote_code=trust_remote_code,
127:                    revision=model_revision
128:                ).to(dev)
129:                self.tokenizer = Tokenizer.from_pretrained("ComfyUI/models/moondream2")
caniyabanci76 commented 2 months ago

Thanks!