{
  "id": "sam2-1-hiera-large",
  "identity": {
    "family": "sam2",
    "display_name": "SAM 2.1 Hiera Large",
    "hub_id": "facebook/sam2.1-hiera-large",
    "api_name": null,
    "revision": null,
    "variants": [
      "facebook/sam2-hiera-large (SAM 2.0)"
    ],
    "license": "Apache-2.0",
    "commercial_use": true,
    "commercial_use_note": "Apache-2.0 weights and code; no use restrictions.",
    "release_date": "2024-09-24",
    "paper_url": "https://arxiv.org/abs/2408.00714",
    "repo_url": "https://github.com/facebookresearch/sam2"
  },
  "task": {
    "category": "segmentation",
    "modalities_in": [
      "image",
      "video"
    ],
    "modalities_out": [
      "masks",
      "scores",
      "tracks"
    ],
    "best_at": "Highest-quality promptable masks in images and video, with memory-based tracking of an object across frames.",
    "worst_at": "GPU in practice for video; needs points or boxes (no text prompts)."
  },
  "io": {
    "input": {
      "image": {
        "resolution": "1024x1024 (longest side resized)"
      },
      "video": {
        "frames": "streamed frame by frame with a memory bank"
      },
      "prompts": "points (positive/negative), boxes, or a mask; no text"
    },
    "output": {
      "masks": "binary masks per prompt (3 candidates with IoU scores for ambiguous prompts)",
      "scores": "predicted IoU",
      "tracks": "object ids across video frames"
    }
  },
  "mixpeek_wiring": {
    "extractors": [],
    "feature_uris": [],
    "vector_indexes": [],
    "retriever_stages": [],
    "composes_with": [
      "detector boxes (RT-DETR, D-FINE) -> SAM 2 box prompts -> masks -> masked crops -> SigLIP vectors",
      "masks per frame -> tracks -> object documents spanning a time range"
    ]
  },
  "run": {
    "status": "plugin",
    "status_reason": "Not served. Would run as a custom extractor plugin with transformers Sam2Model (safetensors, no remote code), prompted by boxes from a permissive detector.",
    "serve_apps": [],
    "runtime": "transformers Sam2Model + Sam2Processor (Sam2VideoModel for video)",
    "weights_format": "safetensors",
    "trust_remote_code": false,
    "size_on_disk_mb": 898,
    "params_millions": 224,
    "preprocessing": "Resize longest side to 1024, pad, normalize ImageNet mean/std; prompts rescaled to the same frame.",
    "postprocessing": "Upsample low-res mask logits, threshold at 0, pick the best mask by predicted IoU.",
    "serving_shape": "both",
    "batch_size": null,
    "serve_batch": null,
    "scale_to_zero": {
      "min_replicas": 0,
      "max_replicas": 1,
      "idle_timeout_s": 600,
      "memory_gb": 6,
      "num_cpus": 2,
      "num_gpus": 1,
      "cold_start_s": {
        "warm_node_s": null,
        "new_node_s": null,
        "source": null
      },
      "cpu_fallback": false
    }
  },
  "cost": {
    "unmeasured": true,
    "measured": null,
    "note": "No committed measurement; plan row 3 measures it in the standalone image."
  },
  "evidence": {
    "unmeasured": true,
    "items": []
  },
  "refs": [
    "hf://facebook/sam2.1-hiera-large@665f8e2ad61cf5f53d65644ff27c8ee525124610"
  ],
  "formats": [
    {
      "ref": "hf://facebook/sam2.1-hiera-large@665f8e2ad61cf5f53d65644ff27c8ee525124610",
      "format": "safetensors",
      "file": "model.safetensors",
      "loader": "transformers / open_clip from_pretrained; Mixpeek Hub import (api/models/huggingface.py)",
      "supported_today": true
    },
    {
      "ref": "hf://facebook/sam2.1-hiera-large@665f8e2ad61cf5f53d65644ff27c8ee525124610",
      "format": "pytorch_pt",
      "file": "sam2.1_hiera_large.pt",
      "loader": "torch.load (pickle); Mixpeek refuses pickle weights (shared/security/torch_pickle.py)",
      "supported_today": false
    }
  ],
  "use_cases": [
    "segmentation",
    "object-detection",
    "tracking"
  ],
  "recommended": {
    "value": false,
    "for": [],
    "reason": null
  },
  "demos": [],
  "seo": {
    "title": "SAM 2.1 Hiera Large: segmentation model",
    "description": "SAM 2.1 Hiera Large is a image and video segmentation model (Apache-2.0). Can run on Mixpeek as a custom plugin.",
    "keywords": [
      "SAM 2.1 Hiera Large",
      "sam2",
      "segmentation",
      "facebook/sam2.1-hiera-large",
      "object-detection",
      "tracking"
    ],
    "faqs": [
      {
        "q": "What is SAM 2.1 Hiera Large best at?",
        "a": "Highest-quality promptable masks in images and video, with memory-based tracking of an object across frames."
      },
      {
        "q": "What are the limits of SAM 2.1 Hiera Large?",
        "a": "GPU in practice for video; needs points or boxes (no text prompts)."
      },
      {
        "q": "Can SAM 2.1 Hiera Large be used commercially?",
        "a": "Yes. Apache-2.0 weights and code; no use restrictions."
      },
      {
        "q": "How does SAM 2.1 Hiera Large run on Mixpeek?",
        "a": "Not served. Would run as a custom extractor plugin with transformers Sam2Model (safetensors, no remote code), prompted by boxes from a permissive detector."
      }
    ]
  },
  "last_verified": "2026-11-05",
  "sources": [
    "https://huggingface.co/facebook/sam2.1-hiera-large",
    "https://arxiv.org/abs/2408.00714",
    "https://github.com/facebookresearch/sam2",
    "https://huggingface.co/docs/transformers/model_doc/sam2"
  ],
  "registry": null,
  "templates": [],
  "usage": {
    "namespaces": null,
    "collections": null,
    "uncounted": true,
    "templates": 0,
    "counted_at": null,
    "source": null
  },
  "facets": {
    "status": "plugin",
    "category": "segmentation",
    "family": "sam2",
    "license": "Apache-2.0",
    "commercial_use": true,
    "modalities_in": [
      "image",
      "video"
    ],
    "modalities_out": [
      "masks",
      "scores",
      "tracks"
    ],
    "use_cases": [
      "segmentation",
      "object-detection",
      "tracking"
    ],
    "recommended": false,
    "release_date": "2024-09-24",
    "params_millions": 224,
    "size_on_disk_mb": 898,
    "vector_dims": null,
    "vector_distance": null,
    "weights_format": "safetensors",
    "formats": [
      "pytorch_pt",
      "safetensors"
    ],
    "loadable_today": true,
    "trust_remote_code": false,
    "cpu_fallback": false,
    "num_gpus": 1,
    "memory_gb": 6,
    "min_replicas": 0,
    "serving_shape": "both",
    "served": false,
    "ref_schemes": [
      "hf"
    ],
    "has_evidence": false,
    "cost_measured": false,
    "template_count": 0,
    "usage_namespaces": null,
    "usage_collections": null,
    "usage_uncounted": true,
    "has_demo": false,
    "rank_score": 1
  },
  "rank_score": 1
}
