---
title: EdgeTAM-fp16
canonical_url: "https://www.modelscope.cn/models/mlx-community/EdgeTAM-fp16"
md_url: "https://www.modelscope.cn/models/mlx-community/EdgeTAM-fp16.md"
repository: mlx-community/EdgeTAM-fp16
last_updated: 2026-09-23
license: apache-2.0
pipeline_tag: image-segmentation
tasks:
  - image-segmentation
base_model:
  - facebookresearch/EdgeTAM
base_model_relation: finetune
parameters: 13.9M
tensor_type:
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 20
stars: 0
tags:
  - mlx
  - segmentation
  - promptable-segmentation
  - sam2
  - edgetam
---

# EdgeTAM-fp16

> EdgeTAM-fp16 - mlx-community 在 ModelScope 开源的模型。mlx-community/EdgeTAM-fp16

mlx-community/EdgeTAM-fp16 是 ModelScope 魔搭社区上的 13.9M 参数image-segmentation模型，采用 apache-2.0 许可，基于 facebookresearch/EdgeTAM 构建。

- **Repository**: mlx-community/EdgeTAM-fp16
- **License**: apache-2.0
- **Tasks**: image-segmentation
- **Parameters**: 13.9M
- **Base model**: facebookresearch/EdgeTAM
- **Tags**: mlx, segmentation, promptable-segmentation, sam2, edgetam
- **Downloads**: 20
- **Stars**: 0
- **Last updated**: 2026-09-23

Source: https://www.modelscope.cn/models/mlx-community/EdgeTAM-fp16

---

# mlx-community/EdgeTAM-fp16

[EdgeTAM](https://github.com/facebookresearch/EdgeTAM) is on-device SAM 2 for promptable segmentation and video
tracking. This repo holds it converted to Apple **MLX** (fp16) for the
[`mlx-edgetam-swift`](https://github.com/xocialize/mlx-edgetam-swift) Swift package (`EdgeTAMPackage`, an MLXEngine
`promptSegment` + `trackObject` ModelPackage). There are 874 tensors (image + video), checked against the official
`edgetam.pt` (fp16 rounding only).

**Parity (v0.5.0).** Measured on the CPU fp32 stream against upstream PyTorch, through the public predictors:
- **image:** image_embed relative error ≤ 2.4e-4, and every click and box mask matches at IoU 1.0000 on square
  and non-square images;
- **video:** 5-frame point and box tracks stay at IoU ≥ 0.999.

**Expect weak single clicks on flat-shaded or synthetic images.** Upstream EdgeTAM behaves the same way; a box
prompt is its reliable input. For a better click-selection tier see
[SAM2.1-hiera-small-fp16](https://huggingface.co/mlx-community/SAM2.1-hiera-small-fp16).

## Use
```swift
// .package(url: "https://github.com/xocialize/mlx-edgetam-swift", from: "0.6.0")
import EdgeTAM
let p = try EdgeTAMPredictor.fromPretrained(weightsPath, dtype: .float16)
p.setImage(sourceCGImage)                       // encoder once per image
let r = p.predict(point: (500, 375))            // r.mask, r.soft (anti-aliased), r.score
let vp = try EdgeTAMVideoPredictor.fromPretrained(weightsPath, dtype: .float16)
```

Weights: Apache-2.0 (facebookresearch/EdgeTAM). Port code: MIT.
