Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_captions.py errors! #79

Open
hongsheng-Z opened this issue Oct 29, 2024 · 3 comments
Open

generate_captions.py errors! #79

hongsheng-Z opened this issue Oct 29, 2024 · 3 comments

Comments

@hongsheng-Z
Copy link

Thanks for your excellent work. When I run your code I get the following error :
** File "/mnt/data/anaconda3/lib/python3.9/site-packages/clip_interrogator/clip_interrogator.py", line 85, in load_caption_model
caption_model = BlipForConditionalGeneration.from_pretrained(model_path, torch_dtype=self.dtype)**
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like Salesforce/blip-image-captioning-large is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

This should be a problem with my network. I tried to load the model manually, but I couldn't find a download link for the pre-trained Salesforce/blip-image-captioning-large model at huggingface.

@Algolzw
Copy link
Owner

Algolzw commented Oct 29, 2024

Hi, you can try to clone the BLIP repository with their provided models via: https://huggingface.co/Salesforce/blip-image-captioning-large?clone=true.

@hongsheng-Z
Copy link
Author

Is it downloading the whole blip-image-captioning-large project locally and then loading it manually? Thanks for your help!

@hongsheng-Z
Copy link
Author

Is it downloading the whole blip-image-captioning-large project locally and then loading it manually? Thanks for your help!

Thanks, I have solved this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants