OpenCLIP
Open source PyTorch implementation of OpenAI's CLIP for training and running contrastive language-image models.
At a Glance
OpenCLIP self-hosted open source implementation of CLIP, released under the MIT license text.
Engagement
Available On
Alternatives
Listed Oct 2026
About OpenCLIP
OpenCLIP is an open source implementation of OpenAI's CLIP (Contrastive Language-Image Pre-training), maintained under the mlfoundations organization. It provides pretrained image-text models and a training codebase, installable as the open_clip_torch Python package. The latest listed release is v3.3.0.
What It Is
OpenCLIP is a PyTorch library for loading, running, and training contrastive vision-language models. Users create a model, preprocessing transforms, and tokenizer, then encode images and text into embeddings and compare them for zero-shot classification. Pretrained weights come from datasets such as LAION-400M, LAION-2B and DataComp-1B, and it can also load other models such as SigLIP, DFN and PE-Core variants.
Training and Evaluation Workflow
The training entry point (open_clip_train.main) reads image-text data from CSV files or WebDataset tar shards and supports multiple data sources with upsampling factors. It scales from a single process to multi-node and SLURM runs, with options for gradient accumulation, patch dropout, model distillation, and checkpoint resume. Zero-shot evaluation can run on ImageNet or on audio datasets for CLAP models. The README also documents CoCa training and caption generation, int8 inference via bitsandbytes (beta), and pushing models to the Hugging Face Hub.
Main Branch Changes
The README notes that main uses a refactored training stack built on TrainingTask wrappers, dict-based batches, FSDP2 support, NaFlex variable-resolution pipelines, and several torch.compile strategies. New experimental model families include NaFlex CLIP, CLAP, GenLIP/GenLAP, MaMMUT and CoCa v2 configs. It lists breaking changes, including removal of Horovod and TorchScript support and a minimum of torch 2.6. Users who need the older training API are directed to the v3 branch or the 3.x PyPI releases.
Community Discussions
Be the first to start a conversation about OpenCLIP
Share your experience with OpenCLIP, ask questions, or help others learn from your insights.
Pricing
Open Source
OpenCLIP self-hosted open source implementation of CLIP, released under the MIT license text.
- MIT license text in the LICENSE file: permission granted, free of charge, to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- Provided "AS IS" without warranty
- Training and inference code for CLIP, CoCa and related models
- GitHub license metadata shows Other (NOASSERTION); the LICENSE file text is MIT-style
Capabilities
Key Features
- Pretrained CLIP-style image-text models loadable by name
- Zero-shot image classification
- Training on CSV and WebDataset data
- Multi-GPU, multi-node and SLURM distributed training
- FSDP2 and torch.compile strategies
- CoCa captioning and text generation
- CLAP audio-text training and zero-shot evaluation
- NaFlex variable-resolution image pipelines
- Model distillation and gradient accumulation
- Int8 inference via bitsandbytes (beta)
- Push models to Hugging Face Hub
