Closed barinov274 closed 10 months ago
Can you fix the lint ?
And maybe add one test case there https://github.com/barinov274/clip-retrieval/blob/patch-1/tests/test_clip_inference/test_mapper.py#L9
pls merge
that seems important but there is no test
also I am not convinced about the " | " syntax. ";" may be better
spaces have bad properties for shell arguments
thanks, I merged this into https://github.com/rom1504/clip-retrieval/pull/314
There are quite a few openclip models, but I need specifically laion/CLIP-ViT-L-14-DataComp.XL-s13B-b90K I looked at the load_model function, it parses the
--clip_mode
l argument, and if the string starts withopen_clip:
, then using theload_open_clip
function, which actually loads the openclip modelThat's all great, but then I would expect to see some sort of parsing line after
open_clip:
, like, after for exampleViT-L-14
, there should be a specification of which model I want to download. But instead, I saw this.So, the user is downloaded to the computer a random model that the user has no idea about, and he doesn't even have the ability to choose the model that he wants. And you can see the wide variety of models that the open_clip library offers:
I propose a commit So you can choose a model by typing
clip-retrieval inference --clip_model "open_clip:ViT-L-14 | datacomp_xl_s13b_b90k" ...
And even if you don't set the checkpoint after "|", you'll get a line about the modelprint(f"Loading OpenClip model{model} with {checkpoint} checkpoint")