msluszniak commited on
Commit
ddddd43
·
verified ·
1 Parent(s): 2dfa6c7

Core ML: fix the output contract, the model never loaded through the task

Browse files

The Core ML export emitted three batched outputs, packing scores and class ids into one tensor:

[(1,100,4), (1,100,2), (1,100,78,78)]

createInstanceSegmenter validates against four unbatched outputs:

[f32(N,4), f32(N), f32(N), f32(N,MH,MW)] boxes, scores, classes, masks

so the model failed spec validation on device with "spec doesn't match any of provided variant for batched and unbatched". This affected every precision, including the int8 build that preceded fp16, so the Core ML variant of this model had never been usable through the task. The sibling xnnpack export already had the correct flattened contract; the Core ML wrapper was simply never brought along.

Now emits (100,4), (100,), (100,), (100,78,78). Verified loading and rendering correctly on an iPhone 16.

The published config already declared the correct four outputs, which is why nothing caught the drift.

v0.9.0 and below are untouched.

Files changed (1) hide show
  1. coreml/rfdetr_nano_coreml_fp16.pte +2 -2
coreml/rfdetr_nano_coreml_fp16.pte CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5882a3124832a8e09c63c5395d0e855a9d7acb23c56309efdddc2f1a8ed3d62c
3
- size 62341694
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:931b3f11c51325a4247dd74aac01d48a8f3291af11d31d8d63e38e0ad0dadb6f
3
+ size 62352989