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

How to load hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 without internet access #724

Open
zhaozh10 opened this issue Oct 30, 2023 · 4 comments

Comments

@zhaozh10
Copy link

Huggingface has recently been banned in some countries, so I manually download files under biomedclip repo and hope to load it total from local file.

I tried
open_clip.get_tokenizer('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224', cache_dir='/home/sdb/preTrain/biomedclip/')
but the connection error still raise.

Any ideas?

@Tranquil1ty
Copy link

You can refer to this https:/mlfoundations/open_clip/issues/528. I'm also experiencing the same issue. If you have any other solutions, please get in touch with me.

@LIKP0
Copy link

LIKP0 commented Dec 24, 2023

Hello all, I've tried to download the bin file from BiomedCLIP/repo, but model, preprocess = create_model_from_pretrained(model_name='ViT-B-16', pretrained="/home/BiomedCLIP/open_clip_pytorch_model.bin") still don't work. Any idea?

@MyHogsmeade
Copy link

Do you know how to fix it

Hello all, I've tried to download the bin file from BiomedCLIP/repo, but model, preprocess = create_model_from_pretrained(model_name='ViT-B-16', pretrained="/home/BiomedCLIP/open_clip_pytorch_model.bin") still don't work. Any idea?

@sheng-z
Copy link

sheng-z commented Sep 27, 2024

Didn't expect many needs to load from local files. I added an example snippet here: https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224#22-load-from-local-files

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

5 participants