ONNX Model Zoo

onnx-community/metaclip-2-worldwide-huge-378-ONNX

By onnx-community · ↓ 12 · ♥ 0 · Updated 2025-10-20

What's in this repo

This page lists the files in onnx-community/metaclip-2-worldwide-huge-378-ONNX, including model.onnx, text_model.onnx, vision_model.onnx.

  • 3 ONNX models (.onnx files)
  • 13 files, including 5 .json, 3 .onnx, 3 .onnx_data, 1 .md
  • Last updated 2025-10-20

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/text_model.onnx — Download
onnx/vision_model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Model Card for MetaCLIP 2 (worldwide) ONNX

MetaCLIP 2 (worldwide) was presented in MetaCLIP 2: A Worldwide Scaling Recipe.

This checkpoint corresponds to ONNX implementation of the original implementation.

Install

First install the optimum-onnx library (from source for now):

pip install -q git+https://github.com/huggingface/optimum-onnx.git

Usage

Next you can use it like so:

import requests
from PIL import Image
from transformers import AutoProcessor
from optimum.onnxruntime.modeling import ORTModelForZeroShotImageClassification

model = ORTModelForZeroShotImageClassification.from_pretrained("onnx-community/metaclip-2-worldwide-huge-378-ONNX", subfolder="onnx")
processor = AutoProcessor.from_pretrained("onnx-community/metaclip-2-worldwide-huge-378-ONNX")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
labels = ["a photo of a cat", "a photo of a dog", "a photo of a car"]

inputs = processor(text=labels, images=image, return_tensors="pt", padding=True)
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image

Acknowledgements

Model info

transformers onnx metaclip_2 clip multilingual zero-shot-image-classification arxiv:2507.22062 license:cc-by-nc-4.0 endpoints_compatible region:us
↓ 12 ♥ 0

Created: 2025-09-30

Updated: 2025-10-20

View on Hugging Face

Files (13)

.gitattributes
README.md
config.json
onnx/model.onnx ONNX
onnx/model.onnx_data
onnx/text_model.onnx ONNX
onnx/text_model.onnx_data
onnx/vision_model.onnx ONNX
onnx/vision_model.onnx_data
preprocessor_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json

Related models