Instructions to use cukrus/sam3-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cukrus/sam3-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("mask-generation", model="cukrus/sam3-bf16")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("cukrus/sam3-bf16") model = AutoModel.from_pretrained("cukrus/sam3-bf16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
You need to agree to share your Hugging Face information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
bf16 copy of Meta's SAM 3, distributed under the SAM License (see LICENSE). By requesting access you agree to its terms.
Log in or Sign Up to review the conditions and access this model content.
SAM 3 bf16
facebook/sam3 cast from fp32 to bf16.
| size | |
|---|---|
| fp32 (original) | 3.44 GB |
| bf16 | 1.72 GB |
Floating-point tensors cast to bf16, everything else unchanged (configs, tokenizer, integer
tensors). Conversion script: sam3-convert.py.
Mask IoU vs fp32: ≥ 0.999 on the tested images.
Examples
bf16 masks, text prompts car, fox, person.
import torch
from transformers import Sam3Model, Sam3Processor
model = Sam3Model.from_pretrained("cukrus/sam3-bf16", torch_dtype=torch.bfloat16).to("cuda")
processor = Sam3Processor.from_pretrained("cukrus/sam3-bf16")
Jetson Orin Nano 8GB: load 3 s, inference ~2 s, +0.2 s per extra text phrase.
License
SAM License, see LICENSE.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cukrus/sam3-bf16
Base model
facebook/sam3

