chore: Bump version to 0.12.13 and update documentation for color space handling

This commit is contained in:
2026-08-19 13:42:29 +08:00
parent c115498b5e
commit 753f87da03
20 changed files with 189 additions and 37 deletions

View File

@@ -76,6 +76,34 @@ class MogeOnnxTest(unittest.TestCase):
["DmlExecutionProvider", "CPUExecutionProvider"],
)
def test_coreml_session_uses_mlprogram(self):
calls = []
fake_runtime = ModuleType("onnxruntime")
fake_runtime.get_available_providers = lambda: [
"CoreMLExecutionProvider",
"CPUExecutionProvider",
]
fake_runtime.InferenceSession = lambda path, providers: calls.append(
(path, providers)
)
with patch.dict(sys.modules, {"onnxruntime": fake_runtime}):
self.moge.create_runtime_session("model.onnx")
self.assertEqual(calls[0][0], "model.onnx")
self.assertEqual(
calls[0][1][0],
(
"CoreMLExecutionProvider",
{
"ModelFormat": "MLProgram",
"MLComputeUnits": "ALL",
"RequireStaticInputShapes": "0",
"EnableOnSubgraphs": "0",
},
),
)
def test_explicit_unavailable_provider_falls_back_to_cpu(self):
providers = self.moge.select_providers(
"cuda",