Skip to content

Commit

Permalink
Prepping for final MobileCLIP weight locations (#2199)
Browse files Browse the repository at this point in the history
* Prepping for final MobileCLIP weight locations

* Update weight locations to coreml-projects

* Update mobileclip weight locations with final apple org location
  • Loading branch information
rwightman authored Jun 13, 2024
1 parent 575978b commit 22de845
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions timm/models/fastvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,21 +1391,21 @@ def _cfg(url="", **kwargs):
),

"fastvit_mci0.apple_mclip": _cfg(
#hf_hub_id='timm/',
hf_hub_id='apple/mobileclip_s0_timm',
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s0.pt',
crop_pct=0.95,
num_classes=512, # CLIP proj dim
mean=(0., 0., 0.), std=(1., 1., 1.)
),
"fastvit_mci1.apple_mclip": _cfg(
# hf_hub_id='timm/',
hf_hub_id='apple/mobileclip_s1_timm',
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s1.pt',
crop_pct=0.95,
num_classes=512, # CLIP proj dim
mean=(0., 0., 0.), std=(1., 1., 1.)
),
"fastvit_mci2.apple_mclip": _cfg(
# hf_hub_id='timm/',
hf_hub_id='apple/mobileclip_s2_timm',
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s2.pt',
crop_pct=0.95,
num_classes=512, # CLIP proj dim
Expand Down
10 changes: 6 additions & 4 deletions timm/models/vision_transformer_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,15 @@ def _cfg(url='', **kwargs):
'vit_base_resnet50d_224.untrained': _cfg(
mean=IMAGENET_DEFAULT_MEAN, std=IMAGENET_DEFAULT_STD, first_conv='patch_embed.backbone.conv1.0'),

'vit_base_mci_224.apple_mclip': _cfg(
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_b.pt',
'vit_base_mci_224.apple_mclip_lt': _cfg(
hf_hub_id='apple/mobileclip_b_lt_timm',
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_blt.pt',
num_classes=512,
mean=(0., 0., 0.), std=(1., 1., 1.), first_conv='patch_embed.backbone.0.conv',
),
'vit_base_mci_224.apple_mclip_lt': _cfg(
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_blt.pt',
'vit_base_mci_224.apple_mclip': _cfg(
hf_hub_id='apple/mobileclip_b_timm',
url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_b.pt',
num_classes=512,
mean=(0., 0., 0.), std=(1., 1., 1.), first_conv='patch_embed.backbone.0.conv',
),
Expand Down

0 comments on commit 22de845

Please sign in to comment.