Instructions to use kunalkanaujiya/clip-vit-base-patch32-vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kunalkanaujiya/clip-vit-base-patch32-vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="kunalkanaujiya/clip-vit-base-patch32-vision")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, CLIPVisionModelWithProjection tokenizer = AutoTokenizer.from_pretrained("kunalkanaujiya/clip-vit-base-patch32-vision") model = CLIPVisionModelWithProjection.from_pretrained("kunalkanaujiya/clip-vit-base-patch32-vision", device_map="auto") - Notebooks
- Google Colab
- Kaggle
CLIP ViT-B/32 β vision encoder only (fp16)
The image encoder and visual projection of openai/clip-vit-base-patch32, saved on its own in half precision (176 MB instead of 605 MB). Weights are unchanged apart from the precision; image-to-image cosine similarities match the original within ~0.0003.
Used by SnapBuy AI to rank shopping listings by visual similarity in a size-limited serverless function.
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
model = CLIPVisionModelWithProjection.from_pretrained(
"kunalkanaujiya/clip-vit-base-patch32-vision"
).float()
processor = CLIPImageProcessor.from_pretrained("kunalkanaujiya/clip-vit-base-patch32-vision")
embeddings = model(**processor(images=image, return_tensors="pt")).image_embeds
Original model by OpenAI, released under the MIT license. See the original model card for intended uses and limitations.
- Downloads last month
- 411
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support