Commit Graph

174 Commits (9613c7684408c4ca0c4a1448d0972b7ecb3564db)

Author SHA1 Message Date
Ross Wightman a5a2ad2e48 Fix consistency, testing for forward_head w/ pre_logits, reset_classifier, models with pre_logits size != unpooled feature size
* add test that model supports forward_head(x, pre_logits=True)
* add head_hidden_size attr to all models and set differently from num_features attr when head has hidden layers
* test forward_features() feat dim == model.num_features and pre_logits feat dim == self.head_hidden_size
* more consistency in reset_classifier signature, add typing
* asserts in some heads where pooling cannot be disabled
Fix #2194
2024-06-07 13:53:00 -07:00
Ross Wightman cc8a03daac Add ConvStem and MobileCLIP hybrid model for B variant. Add full norm disable support to ConvNormAct layers 2024-06-06 09:15:27 -07:00
Ross Wightman 1b66ec7cf3 Fixup ViTamin, add hub weight reference 2024-06-03 17:14:03 -07:00
Ross Wightman 5dce710101 Add vit_little in12k + in12k-ft-in1k weights 2024-05-27 14:56:03 -07:00
Ross Wightman 84cb225ecb Add in12k + 12k_ft_in1k vit_medium weights 2024-05-20 15:52:46 -07:00
Ross Wightman 83aee5c28c Add explicit GAP (avg pool) variants of other SigLIP models. 2024-05-15 07:53:19 -07:00
Ross Wightman 7b3b11b63f Support loading of paligemma weights into GAP variants of SigLIP ViT. Minor tweak to npz loading for packed transformer weights. 2024-05-14 15:44:37 -07:00
Ross Wightman a69863ad61
Merge pull request #2156 from huggingface/hiera
WIP Hiera implementation.
2024-05-13 14:58:12 -07:00
Ross Wightman f7aa0a1a71 Add missing vit_wee weight 2024-05-13 12:05:47 -07:00
Ross Wightman c838c4233f Add typing to reset_classifier() on other models 2024-05-12 11:12:00 -07:00
Ross Wightman 1d3ab176bc Remove debug / staging code 2024-05-10 22:16:34 -07:00
Ross Wightman aa4d06a11c sbb vit weights on hub, testing 2024-05-10 17:15:01 -07:00
Ross Wightman 3582ca499e Prepping weight push, benchmarking. 2024-05-10 14:14:06 -07:00
Ross Wightman cb57a96862 Fix early stop for efficientnet/mobilenetv3 fwd inter. Fix indices typing for all fwd inter. 2024-05-04 10:21:58 -07:00
Ross Wightman f8979d4f50 Comment out time local files while testing new vit weights 2024-05-03 20:26:56 -07:00
Ross Wightman c719f7eb86 More forward_intermediates() updates
* add convnext, resnet, efficientformer, levit support
* remove kwargs only for fn so that torchscript isn't broken for all :(
* use reset_classifier() consistently in prune
2024-05-03 16:22:32 -07:00
Ross Wightman c22efb9765 Add wee & little vits for some experiments 2024-05-02 10:51:35 -07:00
Ross Wightman 67332fce24 Add features_intermediate() support to coatnet, maxvit, swin* models. Refine feature interface. Start prep of new vit weights. 2024-04-30 16:56:33 -07:00
Ross Wightman 4b2565e4cb More forward_intermediates() / FeatureGetterNet work
* include relpos vit
* refactor reduction / size calcs so hybrid vits work and dynamic_img_size works
* fix -ve feature indices when pruning
* fix mvitv2 w/ class token
* refine naming
* add tests
2024-04-10 15:11:34 -07:00
Ross Wightman 679daef76a More forward_intermediates() & features_only work
* forward_intermediates() added to beit, deit, eva, mvitv2, twins, vit, vit_sam
* add features_only to forward intermediates to allow just intermediate features
* fix #2060
* fix #1374
* fix #657
2024-04-09 21:29:16 -07:00
Ross Wightman 5fdc0b4e93 Exploring vit features_only using get_intermediate_layers() as per #2131 2024-04-07 11:24:45 -07:00
Ross Wightman c559c3911f Improve vit conversions. OpenAI convert pass through main convert for patch & pos resize. Fix #2120 2024-03-21 10:00:43 -07:00
Ross Wightman 256cf19148 Rename tinyclip models to fit existing 'clip' variants, use consistently mapped OpenCLIP compatible checkpoint on hf hub 2024-03-20 15:21:46 -07:00
Thien Tran 1a1d07d479 add other tinyclip 2024-03-19 07:27:09 +08:00
Thien Tran dfffffac55 add tinyclip 8m 2024-03-19 07:02:17 +08:00
Cheng-Ling Lai db06b56d34
Saved computational costs of get_intermediate_layers() from unused blocks 2024-03-17 21:34:06 +08:00
Cheng-Ling Lai 4731e4efc4
Modified ViT get_intermediate_layers() to support dynamic image size 2024-03-16 23:07:21 +08:00
Ross Wightman ac1b08deb6 fix_init on vit & relpos vit 2024-02-10 20:15:37 -08:00
Ross Wightman 87fec3dc14 Update experimental vit model configs 2024-02-10 16:05:58 -08:00
Ross Wightman ada145b016 Literal use w/ python < 3.8 requires typing_extension, cach instead of check sys ver 2023-11-21 09:48:03 -08:00
Laureηt 21647c0a0c Add types to vision_transformers.py 2023-11-17 16:06:06 -08:00
Ross Wightman 7c685a4ef3 Fix openai quickgelu loading and add mnissing orig_in21k vit weights and remove zero'd classifier w/ matching hub update 2023-11-16 19:16:28 -08:00
Ross Wightman dcfdba1f5f Make quickgelu models appear in listing 2023-11-03 11:01:41 -07:00
Ross Wightman 96bd162ddb Add cc-by-nc-4.0 license for metaclip, make note in quickgelu model def about pretrained_cfg mapping 2023-11-03 11:01:41 -07:00
Ross Wightman 6894ec7edc Forgot about datcomp b32 models 2023-11-03 11:01:41 -07:00
Ross Wightman a2e4a4c148 Add quickgelu vit clip variants, simplify get_norm_layer and allow string args in vit norm/act. Add metaclip CLIP weights 2023-11-03 11:01:41 -07:00
Ross Wightman c55bc41a42 DFN CLIP ViT support 2023-10-31 12:16:21 -07:00
Ross Wightman 68a121402f Added hub weights for dinov2 register models 2023-10-29 23:03:48 -07:00
Ross Wightman 3f02392488 Add DINOv2 models with register tokens. Convert pos embed to non-overlapping for consistency. 2023-10-29 23:03:48 -07:00
Patrick Labatut 97450d618a Update DINOv2 license to Apache 2.0 2023-10-27 09:12:51 -07:00
Ross Wightman d3ebdcfd93 Disable strict load when siglip vit pooling removed 2023-10-19 12:03:40 -07:00
Ross Wightman e728f3efdb Cleanup ijepa models, they're just gap (global-avg-pool) models w/o heads. fc-norm conversion was wrong, gigantic should have been giant 2023-10-17 15:44:46 -07:00
Ross Wightman 49a459e8f1 Merge remote-tracking branch 'upstream/main' into vit_siglip_and_reg 2023-10-17 09:36:48 -07:00
Ross Wightman 59b622233b Change ijepa names, add pretrain cfg for reg experimentts 2023-10-17 07:16:17 -07:00
Ross Wightman 71365165a2 Add SigLIP weights 2023-10-16 23:26:08 -07:00
Ross Wightman 42daa3b497 Add full set of SigLIP models 2023-10-10 22:15:45 -07:00
Yassine 884ef88818 fix all SDPA dropouts 2023-10-05 08:58:41 -07:00
Ross Wightman b9dde58076 Fixup attention pooling in siglip vit support 2023-10-02 11:44:12 -07:00
Ross Wightman 99cfd6702f Use global pool arg to select attention pooling in head 2023-09-30 16:16:21 -07:00
Ross Wightman 82cc53237e Working on support for siglip (w/ attn pool) vit backbone, and adding registers (reg tokens) 2023-09-30 16:03:01 -07:00