feat: Update CoreML device support and server controls

- Replace 'mps' with 'coreml' as the identifier for Apple CoreML Execution Provider across the codebase.
- Remove Apple chip generation checks and ensure CoreML is available on all macOS arm64 devices.
- Adjust ONNX Runtime session creation to use default CoreML configurations without forcing 'MLProgram'.
- Implement support for MoGe-2 to utilize CoreML with static input shape requirements.
- Enhance server panel to display restart and stop controls consistently across running states, including 'BUSY'.
- Update UI tests to verify new behavior for server controls and cached model display.
- Bump blendjob dependency version to 0.1.16 in packaging tests and configurations.
This commit is contained in:
2026-09-02 10:50:02 +08:00
parent 7f6e47432e
commit 5a011b3b57
24 changed files with 619 additions and 117 deletions

View File

@@ -79,7 +79,7 @@ class Moge2OnnxTest(unittest.TestCase):
["DmlExecutionProvider", "CPUExecutionProvider"],
)
def test_coreml_session_uses_mlprogram(self):
def test_coreml_session_requires_static_input_partitions(self):
calls = []
fake_runtime = ModuleType("onnxruntime")
fake_runtime.get_available_providers = lambda: [
@@ -91,20 +91,21 @@ class Moge2OnnxTest(unittest.TestCase):
)
with patch.dict(sys.modules, {"onnxruntime": fake_runtime}):
self.moge.create_runtime_session("model.onnx")
self.moge.create_session("moge-model", "coreml")
self.assertEqual(calls[0][0], "model.onnx")
self.assertEqual(
calls[0][1][0],
(
"CoreMLExecutionProvider",
{
"ModelFormat": "MLProgram",
"MLComputeUnits": "ALL",
"RequireStaticInputShapes": "0",
"EnableOnSubgraphs": "0",
},
),
calls[0][0],
str(Path("moge-model") / "model.onnx"),
)
self.assertEqual(
calls[0][1],
[
(
"CoreMLExecutionProvider",
{"RequireStaticInputShapes": "1"},
),
"CPUExecutionProvider",
],
)
def test_explicit_unavailable_provider_falls_back_to_cpu(self):