open_clip icon indicating copy to clipboard operation
open_clip copied to clipboard

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

Open zhaozh10 opened this issue 1 year ago • 4 comments

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?

zhaozh10 avatar Oct 30 '23 12:10 zhaozh10

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

Tranquil1ty avatar Oct 31 '23 16:10 Tranquil1ty

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?

LIKP0 avatar Dec 24 '23 13:12 LIKP0