| Name | Modified | Size | Downloads / 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 thetorchvisionpostprocessing backend is picked when either GPU is present. Detection goes throughtorch.backends.mps.is_available(), which exists on every supported torch version and reportsFalseon non-Apple builds. threading.currentThread()replaced withcurrent_thread()(#1392), removing aDeprecationWarningon newer Python versions.
📚 Documentation
- Turkish translation of the documentation, with a build step and
zensicalconfiguration 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-uv8.3.2 → 9.0.0 (#1399),actions/setup-python6.3.0 → 7.0.0 (#1400) andactions/checkout7.0.0 -> 7.0.1 (#1398). - Relaxed the
twinerequirement 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