CLIP icon indicating copy to clipboard operation
CLIP copied to clipboard

Using clip.load("ViT-L/14", device=device) Failed to load

Open Blessing92 opened this issue 1 year ago • 5 comments

Has anyone faced the same issue? Whenever I tried to load the ViT-L/14 model, the server crashed. I tried downloading the pre-trained model and loading it directly with clip.load(path_to_directory), but the issue still occurs.

Did anyone try something similar? Thanks

Blessing92 avatar Jun 01 '23 12:06 Blessing92

me too, did u fix the problem? thanks!

dudezhanghao avatar Jun 12 '23 08:06 dudezhanghao

From what I understood from the repo, you can not use clip.load(path_to_directory) to load the pre-trained model directly, but you must use the URL link. I downloaded the pre-trained model, saved it to private storage, and passed the link to the loader. Works for me.

Blessing92 avatar Jun 12 '23 14:06 Blessing92

@Blessing92 Hi, may I ask where did u download the pre-trained model?

daeunni avatar Feb 19 '24 12:02 daeunni

Hi @daeunni You can find all the pre-trained models here: https://github.com/openai/CLIP/blob/main/clip/clip.py and then Just paste the URL of one of the pre-trained model in the browser and it will directly download. Hope it helps.

Blessing92 avatar Feb 19 '24 12:02 Blessing92

@Blessing92 Thanks a lot! :-)

daeunni avatar Feb 19 '24 13:02 daeunni