YOLO TorchScript model fails to load on Apple Silicon (MPS float64 error)

Aperta
#671 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

@guptakaran20 ci sta già lavorando.

Dal 7/11/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, pytorch

Direzione di ricerca

Start with the YOLO TorchScript loading path used by tutorial_image_detection_yolo.ipynb and the GUI, then reproduce the reported float64 error on Apple Silicon with MPS. Check whether the same loading failure occurs in both entry points and how device selection is handled. Done means the model loads successfully on the affected setup, with the reported CPU workaround still available.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On a Mac with Apple Silicon(M5), loading the YOLO TorchScript model fails in tutorial_image_detection_yolo.ipynb and in the GUI with: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. It works if I set the device to cpu.

Possible fix: fall back to cpu if loading on mps fails.

Env: macOS arm64, Python 3.12, torch 2.15.0.

Lingua principale
Python
Stelle
117
Fork
121
Merge medio
2g 17h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JdeRobot/PerceptionMetrics

Tutte le issue di JdeRobot/PerceptionMetrics

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.