Instructions to use apple/DFN2B-CLIP-ViT-L-14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use apple/DFN2B-CLIP-ViT-L-14 with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:apple/DFN2B-CLIP-ViT-L-14') tokenizer = open_clip.get_tokenizer('hf-hub:apple/DFN2B-CLIP-ViT-L-14') - Notebooks
- Google Colab
- Kaggle
Update README.md
#4
by dotREADYus - opened
The original code sample would throw this error TypeError: unsupported operand type(s) for +: 'Tensor' and 'NoneType'.
Per https://github.com/mlfoundations/open_clip/issues/736#issuecomment-1801879013, the updated sample will run without issue.