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
Safetensors
Model size
87.8M params
Tensor type
F16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for kunalkanaujiya/clip-vit-base-patch32-vision

Finetuned
(160)
this model
Finetunes
1 model