Error: Unable to parse ML Program: at unknown location: Unknown opset 'CoreML8'.

#3
by nhe-ai - opened

m = ct.models.MLModel("models/DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage")

coremltools/models/model.py:628: RuntimeWarning: You will not be able to run predict() on this Core ML model. Underlying exception message was: Error compiling model: "Failed to parse the model specification. Error: Unable to parse ML Program: at unknown location: Unknown opset 'CoreML8'.".
_warnings.warn(

And while attempting to predict:
o = m.predict({"image": Image.open("input.png").resize((1536,1536))})

coremltools/models/model.py", line 617, in _get_proxy_and_spec
_MLModelProxy(
RuntimeError: Error compiling model: "Failed to parse the model specification. Error: Unable to parse ML Program: at unknown location: Unknown opset 'CoreML8'.".

Apparently, the problem is in the system itself and the CoreML version needed (8) that appears in macos 15.

Can anyone export the model targeting lower version of CoreML? Or maybe share the exact recipe for the conversion?

Sign up or log in to comment