DINOv3 ViT-7B/16 — ONNX
Built with DINOv3 — model and weights © Meta Platforms, Inc.
An ONNX export of Meta's DINOv3 ViT-7B/16 vision backbone. The weights are unmodified — this is a format conversion only, published because no ONNX build of the 7B variant existed. Smaller DINOv3 variants are already available in ONNX from onnx-community; this fills the gap at the top of the range.
| File | Size | Purpose |
|---|---|---|
dinov3_vit7b16.onnx |
3.9 MB | graph |
dinov3_vit7b16.onnx.data |
12.8 GB | external-data weights |
Both files are required — the graph references the data file by name, and they must sit in the same directory.
Source
Converted from facebook/dinov3-vit7b16-pretrain-lvd1689m
(timm id timm/vit_7b_patch16_dinov3), 6,716M parameters, patch 16, pretrained
on LVD-1689M.
⚠The upstream model is gated. Meta requires accepting the DINOv3 Licence to access the original weights. This conversion is redistributed under that same agreement — see Licence. If you intend to use DINOv3, please review Meta's terms directly.
Output
4096-dimensional float32 embedding per image.
Input contract
Getting preprocessing wrong yields plausible-but-wrong embeddings that no error message will warn you about. This export expects exactly what the timm reference does:
- Resize so the shortest side is 256, preserving aspect ratio (bicubic / Catmull-Rom).
- Center crop to 256×256.
- ImageNet normalisation — mean
[0.485, 0.456, 0.406], std[0.229, 0.224, 0.225]. - Layout CHW, dtype float32, batch dimension first:
[1, 3, 256, 256].
Input and output are both float32. (An earlier export of this model emitted an fp16 output, which some runtimes reject with a tensor-size error — the published file does not have that problem.)
import numpy as np, onnxruntime as ort
sess = ort.InferenceSession("dinov3_vit7b16.onnx", providers=["CUDAExecutionProvider"])
emb = sess.run(None, {sess.get_inputs()[0].name: x})[0] # x: (1,3,256,256) float32
print(emb.shape) # (1, 4096)
Verification
Cosine similarity 1.000000 against the timm reference implementation on the same inputs. Embeddings from this export are interchangeable with embeddings produced by the PyTorch model.
Hardware
Needs roughly 13 GB of VRAM. It runs on CPU in principle but is impractically slow there — this is a GPU model. If you want DINOv3 features on modest hardware, use a distilled variant (ViT-L ONNX is 1.2 GB and 1024-dim).
Licence
Governed by the DINOv3 Licence
(full text in LICENSE.md), not an OSI-approved open-source
licence.
If you redistribute these files or a derivative work, the agreement requires you to:
- distribute only under the terms of that agreement, and provide a copy of it with the materials (§1.b.i);
- acknowledge DINOv3 in any research publication whose results depend on it (§1.b.ii);
- comply with trade controls and the acceptable-use restrictions — no ITAR activities, military or warfare purposes, nuclear applications, espionage, or weapons development (§1.b.v);
- not reverse-engineer or decompile the materials (§1.b.iv).
Meta may terminate the licence for breach, and the agreement is governed by California law.
Model and weights © Meta Platforms, Inc. This repository contributes only the format conversion; under §5.a you own your own derivative works, and Meta retains ownership of the underlying materials.
Citation
@article{simeoni2025dinov3,
title={DINOv3},
author={Sim{\'e}oni, Oriane and others},
journal={arXiv preprint arXiv:2508.10104},
year={2025}
}
Model tree for comicbox/dinov3-vit7b16-onnx
Base model
facebook/dinov3-vit7b16-pretrain-lvd1689m