Commit Graph

56 Commits

Author SHA1 Message Date
tminer dcba3cb2e2
import packaging to be compatible with setuptools==70.0.0 (#449)
* import packaging to be compatible with setuptools==70.0.0

* importing the version module

---------

Co-authored-by: Jamie <Jamie@Alexandras-MacBook-Pro.local>
Co-authored-by: Jong Wook Kim <jongwook@nyu.edu>
2024-06-05 04:47:22 +09:00
James Thewlis a1d071733d
Fix torch._C.Node attribute access (#372)
Attribute access with subscripting would previously work
due to patching in https://github.com/pytorch/pytorch/pull/82511
but this has been removed.

This commit uses the fix proposed in https://github.com/pytorch/pytorch/pull/82628
to define a helper method to call the appropriate access method.
2023-07-08 02:26:30 -07:00
Jong Wook Kim a9b1bf5920
Update README.md (#326) 2023-02-20 11:49:43 -08:00
Harry Wang 3702849800
np.float is removed in numpy 1.24 (#315) 2023-01-20 11:31:18 -08:00
sarveshwar-s d50d76daa6
Removed another unused f-string (#276) 2022-07-27 12:42:37 -07:00
sarveshwar-s c5478aac7b
Removed unused f-string (#273) 2022-07-27 00:30:08 -07:00
Penn f69a9bc217
Remove inefficient computation from `AttentionPool2d` Module (#271)
* fix inefficient attention computation

* remove erroneous formatting

* simplified flatten

Co-authored-by: Jong Wook Kim <jongwook@nyu.edu>
2022-07-21 13:04:35 -07:00
John Sutor 4d120f3ec3
Add PyTorch Hub configuration file (#259) 2022-07-14 08:40:02 -04:00
ProGamerGov b46f5ac758
Don't reuse nn.ReLU modules (#239) 2022-05-01 14:31:46 -07:00
Jong Wook Kim b4ae44927b
ViT-L/14@336px (#234) 2022-04-21 16:45:46 -07:00
neverix e58d49454c
use pkg_resources for PyTorch version checks in notebooks (#191)
* use pkg_resources for PyTorch version checks in notebooks

* remove version checking in notebook code cell

Co-authored-by: Jong Wook Kim <jongwook@nyu.edu>
2022-04-10 14:08:16 -07:00
liuxingbaoyu 3482bb6ed3
fix utf8 username on windows (#227) 2022-04-10 14:07:46 -07:00
Jong Wook Kim c0065a27ad
Update README.md 2022-04-10 13:39:41 -07:00
In-Ho Yi 7ef63f265b
Patch clip model for ONNX compatibility (#219)
* Patch clip model for ONNX compatibility

Changes to use INT32 for tokenization, since ONNX doesn't yet support ArgMax(INT64)
Use explicit dimension for norm

* Add compatibility fix for torch 1.7
2022-04-10 13:35:32 -07:00
Jong Wook Kim 40f5484c1c update torch versions in workflow 2022-01-25 17:23:09 -08:00
Jong Wook Kim 67fc250eb6 add RN50x64 and ViT-L/14 models 2022-01-25 17:04:00 -08:00
Tan Jia Huei 573315e83f
use `pkg_resources` for PyTorch version comparison (#176)
use `pkg_resources` from `setuptools` to parse version strings, it is required by Pytorch >= 0.4.1 anyway
2021-11-09 01:57:26 -05:00
Tan Jia Huei 1a8b4b2899
Fix PyTorch version check for nightly builds (#173) 2021-11-05 01:17:26 -04:00
Santiago Castro 2867559c5f
Fix PyTorch version check (#160)
* Fix PyTorch version check

* Fix suggestion

Co-authored-by: Jong Wook Kim <jongwook@openai.com>
2021-11-04 17:32:10 -04:00
Jong Wook Kim c7ba4f3907
Add 1.10.0 in tests 2021-11-04 17:20:40 -04:00
Jong Wook Kim e184f608c5
Full list of Kinetics700 (Fix #158) 2021-10-19 01:40:06 -04:00
Jong Wook Kim 04f4dc2ca1 fix prompts format 2021-09-24 00:59:23 -04:00
Jong Wook Kim 4496d72f25 fix eurosat templates 2021-09-23 23:21:49 -04:00
Jong Wook Kim 7df882c555 add prompt data 2021-09-23 23:06:39 -04:00
Jong Wook Kim efe8cbbdf3 added Country211 and Rendered SST2 dataset info 2021-09-23 21:56:48 -04:00
Gianluca Gippetto c13005fd42
In Compose, replace lambda function with named function (#151)
This prevents the following error on Windows (when using
a multi-process DataLoader, for example):

AttributeError: Can't pickle local object '_transform.<locals>.<lambda>'
2021-09-23 21:42:20 -04:00
or-toledano 3b473b0e68
Reduce half of similarity muls after encoding (#140)
(cAB)^T = c B^T A^T
Saves half of the similarity products in the CLIP model.py after the visual/text encoding stages
2021-08-29 05:15:03 -04:00
Jong Wook Kim 539cdcbd48
launch tests on push and PR to main (#145) 2021-08-29 05:08:37 -04:00
Jong Wook Kim fa56f25251 add test.yml (#139) 2021-08-12 03:28:49 -07:00
or-toledano fcab8b6eb9
Update Prompt_Engineering_for_ImageNet.ipynb (#137)
* Can specify root directory when loading model

* specifying download_root instead

* Update Prompt_Engineering_for_ImageNet.ipynb

Fix bug caused by changing default to jit=False with handling the case jit=True as well

* Reduce size of diff

* Reduce size of diff #2

* Reduce size of diff #3

* updated Interacting_with_CLIP.ipynb

* update Prompt_Engineering_for_ImageNet.ipynb

Co-authored-by: kcosta42 <kcosta@student.42.fr>
Co-authored-by: Jong Wook Kim <jongwook@openai.com>
2021-08-09 01:29:38 -07:00
Kevin Costa 22fde59cbe
Can specify root directory when loading model (#136)
* Can specify root directory when loading model

* specifying download_root instead

Co-authored-by: Jong Wook Kim <jongwook@openai.com>
2021-08-08 23:43:22 -07:00
Santiago Castro ff339871f3
Use tqdm with 1024 instead of 1000 unit scale (#131) 2021-08-08 23:20:38 -07:00
Jong Wook Kim 8cad3a736a
Update README.md 2021-07-20 04:02:06 -07:00
Jong Wook Kim dff9d15305 add ViT-B/16 and RN50x16 models 2021-07-19 14:57:31 -07:00
Haofan Wang ea41722f9f
Rename VisualTransformer -> VisionTransformer (#97)
Fixes #94
2021-07-18 20:41:49 -07:00
Jong Wook Kim 504cf9e491 test fix 2021-07-18 20:28:30 -07:00
Romain Beaumont a2737ac264
Add truncate option to tokenize (#126)
* Add truncate_text option to tokenize

This makes it possible to run tokenize on texts that are longer than the number of tokens
that fit the context length without having to try to guess how to cut in number of 
characters beforehand

* add doc, rename to just "truncate", use eot_token

Co-authored-by: Jong Wook Kim <jongwook@openai.com>
2021-07-18 20:17:40 -07:00
Jong Wook Kim db20393f4a Using non-JIT by default; compat fix with 1.8+ 2021-07-18 18:45:21 -07:00
Jong Wook Kim cfcffb90e6 add YFCC100M subset information
(#50)
2021-04-11 02:29:52 -07:00
Jong Wook Kim 8a665a683d fixed model loading issue (#66) 2021-03-23 03:05:17 -04:00
Jong Wook Kim 290ac5cb15
Correctly initializing the logit scale parameter
adding numpy import
2021-03-22 22:09:57 -04:00
Jong Wook Kim 43c953e231
Correctly initializing the logit scale parameter
cf. #46
2021-03-22 18:07:08 -04:00
Smittyvb beba48f353
Update models URIs in notebook (#52) 2021-03-07 21:58:54 -05:00
Jong Wook Kim fd6c1443c2 add RN101 and RN50x4; update paper URL and model card 2021-03-04 12:30:39 -05:00
Sebastian Berns 4c0275784d
Load model from path (#41)
* Load model from path

* showing download progress in "MiB"

* clip.load() now can take a file path

Co-authored-by: Jong Wook Kim <jongwook@openai.com>
2021-02-16 06:19:42 -05:00
Jong Wook Kim 8f6deb52a1 showing download progress in "MiB" 2021-02-15 22:00:33 -05:00
Jong Wook Kim e5347713f4 add prompt engineering notebook 2021-01-30 16:54:01 +09:00
Jong Wook Kim d1cf43d17e using compatible version specifier in requirements.txt 2021-01-30 06:33:56 +09:00
Jong Wook Kim c42a8e3c9e added parameter initialization (fixes #15) 2021-01-30 03:26:10 +09:00
Jong Wook Kim 4a443c18a4 updated README.md to include pip install command 2021-01-30 03:09:59 +09:00