Export yolo26n model to coreXML , only runs when chose .cpuOnly as computing device . GPU and ANE doesn't work

i trained an yolo26n model , which runs well on my Macbook Air M5 (on top of pytorch MPS) . I exported and want to run with apple CoreML . When I select the .cpuOnly as computing device, everything running well ( yes, slow). But when I switch to cpuAndGUP, or .all, the model crash.
I got the error below :

E5RT encountered an STL exception. msg = MILCompilerForANE error: failed to compile ANE model using ANEF. Error=_ANECompiler : ANECCompile() FAILED.MLModel Output: var_1774

my model export code:

model.export(

format="coreml",

imgsz=(736, 1280), # (height, width) — matches actual training shape

quantize=16, # FP16, negligible accuracy loss

nms=False, # YOLO26 is NMS-free

dynamic=False,

)

Just wondering if anyone successfully run the model on MacOS /IOS, with GPU and ANE enabled ? thanks

Does YOLO11n work? Can you try exporting YOLO11n with nms=True?

It’s a bug with CoreML on MacOS. You can use CPU and NE. It works fine and it’s faster than GPU. It’s also only a MacOS bug

It doesn’t affect iOS