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

Add support for the full open clip model name format : ViT-B-32/laion2b_s34b_b79k #314

Merged
merged 8 commits into from
Jan 6, 2024

Conversation

mehdidc
Copy link
Contributor

@mehdidc mehdidc commented Sep 18, 2023

This leaves the defaults the same, but allow the possibility to specify a checkpoint if needed (i.e, corresponds to the pretrained parameter of open clip).

@mehdidc
Copy link
Contributor Author

mehdidc commented Sep 18, 2023

I think, ideally there should be a dict mapping each model to the best available checkpoint (e.g., according to imagenet zero-shot classification results), in case checkpoint is not provided. If there is no mapping in the dict, the cli should throw an error. Not sure though which models were selected before, so this might however break the run if people update the repo with this change. Maybe better to force the user to provide the checkpoint in case of an open_clip: model, to avoid any ambiguity. The other thing is that openai models are also loadable with openclip, so we might not need actually to separate openclip and non openclip cases?

@heyalexchoi
Copy link
Contributor

this would be nice. took awhile for me to figure out which open clip checkpoint actually made my embedding, and it seems the default for 'ViT-L-14' scored considerably lower than some of the other options.

@rom1504
Copy link
Owner

rom1504 commented Jan 6, 2024

this looks similar in intent to #284 but there is no doc nor test

@rom1504 rom1504 changed the title support --clip_checkpoint option for using a specific clip checkpoint Add support for the full open clip model name format : ViT-B-32/laion2b_s34b_b79k Jan 6, 2024
@rom1504
Copy link
Owner

rom1504 commented Jan 6, 2024

I changed this to be like ViT-B-32/laion2b_s34b_b79k with no new arg clip checkpoint

that makes it cleaner imo and does not leak the openclip interface in the top level interface of clip retrieval

it allows for other clip model interfaces to have different model formats

@rom1504 rom1504 merged commit b60b143 into rom1504:main Jan 6, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants