Download Latest Version 0.12.6 source code.zip (43.7 MB) Google Add to Preferred Sources
Home / 0.12.3
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-08-01 2.5 kB
SAHI 0.12.3 - Apple Silicon GPU Support source code.tar.gz 2026-08-01 43.5 MB
SAHI 0.12.3 - Apple Silicon GPU Support source code.zip 2026-08-01 43.6 MB
Totals: 3 Items   87.1 MB 0

A patch release that puts Apple Silicon GPUs to work, adds a Turkish translation of the documentation, and clears CI maintenance gathered since 0.12.2.

🐛 Fixes

  • Apple MPS is now detected for device selection and postprocessing (#1408). select_device() only looked for CUDA, so macOS users fell back to CPU even with a working Metal backend. Automatic selection is now CUDA -> MPS -> CPU, and the torchvision postprocessing backend is picked when either GPU is present. Detection goes through torch.backends.mps.is_available(), which exists on every supported torch version and reports False on non-Apple builds.
  • threading.currentThread() replaced with current_thread() (#1392), removing a DeprecationWarning on newer Python versions.

📚 Documentation

  • Turkish translation of the documentation, with a build step and zensical configuration to match (#1401, #1402, #1404).
  • Multilingual subpath links now resolve correctly (#1403).
  • Backend documentation lists MPS alongside CUDA (#1410).

🧹 Maintenance & CI

  • Device selection and postprocessing backend resolution are covered by tests (#1409).
  • Bumped astral-sh/setup-uv 8.3.2 → 9.0.0 (#1399), actions/setup-python 6.3.0 → 7.0.0 (#1400) and actions/checkout 7.0.0 -> 7.0.1 (#1398).
  • Relaxed the twine requirement to >=5.1.1,<8.0.0 (#1406).

⚡ Performance

NMS with the IOU metric, best of 5 runs, on an Apple M2 Pro:

boxes numpy numba torchvision (MPS)
100 0.14 ms 0.02 ms 1.44 ms
500 1.53 ms 0.36 ms 1.42 ms
1000 5.46 ms 1.40 ms 1.45 ms
5000 81.37 ms 34.16 ms 4.05 ms
20000 1237.70 ms 462.56 ms 11.75 ms

Below roughly 500 boxes numba stays ahead, but the difference there is about a milliseconds.

Full Changelog: https://github.com/obss/sahi/compare/0.12.2...0.12.3

Source: README.md, updated 2026-08-01