An open source implementation of CLIP, with pretrained models
open sourceMITfree
OpenCLIP is an MIT-licensed open source implementation of OpenAI's CLIP contrastive language-image pretraining, with language-audio (CLAP) and related generative models. Its authors have trained models on LAION-400M, LAION-2B and DataComp-1B, and it loads those, the original OpenAI weights and others such as SigLIP and DFN for zero-shot classification, image-text retrieval and embeddings. It also trains and fine-tunes models, with scripts for evaluation and linear probes. It installs from PyPI as open_clip_torch; 4.x is the current line and needs PyTorch 2.6+.
Problems it solves
- embed images and text in the same vector space
- zero-shot image classification with an open model
- train my own CLIP model on my image-text data
Features
- CLIP, CLAP, CoCa and MaMMUT models
- pretrained weights trained on LAION and DataComp, plus OpenAI, SigLIP and DFN weights
- zero-shot classification and image-text embeddings
- training and fine-tuning scripts
- push models to the Hugging Face Hub
Limitations
- 4.x needs PyTorch 2.6 or later, and training scripts from 3.x need review after upgrading.1
Alternatives
The same job
These do what OpenCLIP does.
- CLIP (OpenAI) OpenAI's open image-text model for zero-shot image classification