Core ML: fix the output contract, the model never loaded through the task
Browse filesThe 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.
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:931b3f11c51325a4247dd74aac01d48a8f3291af11d31d8d63e38e0ad0dadb6f
|
| 3 |
+
size 62352989
|