From 3c46320f29be4174b484818a4e0463c5499cdabb Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Sun, 9 Jun 2024 22:58:36 -0700 Subject: [PATCH] Prepping for final MobileCLIP weight locations --- timm/models/fastvit.py | 12 ++++++------ timm/models/vision_transformer_hybrid.py | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/timm/models/fastvit.py b/timm/models/fastvit.py index c2f7f7de4e..a3dbb71da8 100644 --- a/timm/models/fastvit.py +++ b/timm/models/fastvit.py @@ -1391,22 +1391,22 @@ def _cfg(url="", **kwargs): ), "fastvit_mci0.apple_mclip": _cfg( - #hf_hub_id='timm/', - url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s0.pt', + hf_hub_id='reach-vb/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/', - url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s1.pt', + hf_hub_id='reach-vb/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/', - url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_s2.pt', + hf_hub_id='reach-vb/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 mean=(0., 0., 0.), std=(1., 1., 1.) diff --git a/timm/models/vision_transformer_hybrid.py b/timm/models/vision_transformer_hybrid.py index 0c690c35cc..d192eb5f02 100644 --- a/timm/models/vision_transformer_hybrid.py +++ b/timm/models/vision_transformer_hybrid.py @@ -387,12 +387,14 @@ def _cfg(url='', **kwargs): 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', + hf_hub_id='reach-vb/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', ), 'vit_base_mci_224.apple_mclip_lt': _cfg( - url='https://docs-assets.developer.apple.com/ml-research/datasets/mobileclip/mobileclip_blt.pt', + hf_hub_id='reach-vb/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', ),