Feature Improvement: Automatically download and load MetaCLIP checkpoints #29
Merged
howardhsu merged 3 commits intofacebookresearch:mainfrom Nov 27, 2023
Merged
Feature Improvement: Automatically download and load MetaCLIP checkpoints #29howardhsu merged 3 commits intofacebookresearch:mainfrom
howardhsu merged 3 commits intofacebookresearch:mainfrom
Conversation
howardhsu
reviewed
Nov 27, 2023
src/open_clip/pretrained.py
Outdated
| openai="https://openaipublic.azureedge.net/clip/models/40d365715913c9da98579312b702a82c18be219cc2a73407c4526f58eba950af/ViT-B-32.pt", | ||
| laion400m_e31="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/vit_b_32-quickgelu-laion400m_e31-d867053b.pt", | ||
| laion400m_e32="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/vit_b_32-quickgelu-laion400m_e32-46683a32.pt", | ||
| metaclip400m="https://dl.fbaipublicfiles.com/MMPT/metaclip/b32_400m.pt", |
Contributor
There was a problem hiding this comment.
thanks for naming suggestions.
howardhsu
reviewed
Nov 27, 2023
src/open_clip/pretrained.py
Outdated
| laion2b_e16="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/vit_b_32-laion2b_e16-af8dbd0c.pth", | ||
| laion400m_e31="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/vit_b_32-quickgelu-laion400m_e31-d867053b.pt", | ||
| laion400m_e32="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/vit_b_32-quickgelu-laion400m_e32-46683a32.pt", | ||
| metaclip400m="https://dl.fbaipublicfiles.com/MMPT/metaclip/b32_400m.pt", |
Contributor
There was a problem hiding this comment.
all MetaCLIP are trained on quickgelu; let's NOT use nn.gelu explicitly.
howardhsu
approved these changes
Nov 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Improvement based on Issue #26
Code modified/added
src/open_clip/pretrained.pytests/test.pyNow loading MetaCLIP(ViT-B-32, ViT-B32-quickgelu, ViT-B-16, ViT-L-14) can be done as:
And thanks for reviewing this PR in advance.