mlfoundations / open_clip

An open source implementation of CLIP.
Other
9.29k stars 923 forks source link

Option to load just text or image models #799

Closed rbrtcs1 closed 6 months ago

rbrtcs1 commented 6 months ago

It would be useful to have parameters added when loading a pretrained model to specify if you want to only load the text or only the image model (in my case this would be due to RAM restrictions).

It appears you can currently take the model object and just run ‘del model.visual’ but that still requires fitting it in memory first.

rbrtcs1 commented 6 months ago

Edit: just saw this was already discussed. In #719