Support RF-DETR on MacOS
Search before asking
- [x] I have searched the RF-DETR issues and found no similar feature requests.
Description
I have a MacBook Pro with M3 Apple Silicon chip and want to use RF-DETR.
I tried to load an RF-DETR model I trained in Roboflow using Python 3.12, inference 0.55.2 and rfdetr 1.2.1 like this:
from inference import get_model
model = get_model(model_id="poc-1-6jd6o/6")
On first try my Macbook became sluggish (almost unresponsive) for ca 4 minutes and then gave a result, i.e. it worked but super slow.
Then I tried again and after ca 5 minutes and again almost unresponsive Macbook, probably hogging the CPU, it errored like this:
2025-09-18 13:51:17.885441 [E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running 8729918671831316355_CoreML_8729918671831316355_48 node. Name:'CoreMLExecutionProvider_8729918671831316355_CoreML_8729918671831316355_48_48' Status Message: Error executing model: Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1).
Use case
For any dev on a Mac that would like to try RF-DETR it would be great if this worked.
(For YOLOv11 the inference.get_model worked for me out of the box.)
Additional
Would be great if you could mention in the docs if / how it works on MacOS: https://rfdetr.roboflow.com/learn/pretrained/
There's some discussion in #172 but I'm not sure what the conclusion is, i.e. if RF-DETR is supported on MacOS via PyTorch or ONNX or CoreML or if it's simply not supported yet and I should switch to a PC !?
Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
The code snippet you posted should already work natively (and the error message you posted noted it's using the CoreML Execution Provider out of the box).
Without any additional context, it looks like you fine-tuned a model and I'd guess you're trying to use it at too high of a resolution. The nano model's native resolution is 384x384 and compute requirements scale hyperlinearly with resolution.