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

@@ -24,7 +24,7 @@ class ExtensionPackagingTest(unittest.TestCase):
pack = load_pack()
with tempfile.TemporaryDirectory() as directory:
directory_path = Path(directory)
wheel_path = directory_path / "blendjob-0.1.14-py3-none-any.whl"
wheel_path = directory_path / "blendjob-0.1.16-py3-none-any.whl"
wheel_path.write_bytes(b"wheel")
original_dist = pack.DIST_DIR
pack.DIST_DIR = directory_path / "dist"
@@ -132,7 +132,7 @@ class ExtensionPackagingTest(unittest.TestCase):
self.assertIn("server/models/upscale.py", names)
self.assertIn("server/__init__.py", names)
self.assertIn(
"wheels/blendjob-0.1.14-py3-none-any.whl",
"wheels/blendjob-0.1.16-py3-none-any.whl",
names,
)
self.assertFalse(any(name.startswith("blendjob/") for name in names))
@@ -147,7 +147,7 @@ class ExtensionPackagingTest(unittest.TestCase):
def test_reads_extension_dependencies_from_pyproject(self):
pack = load_pack()
self.assertEqual(pack.project_dependencies(), ["blendjob==0.1.14"])
self.assertEqual(pack.project_dependencies(), ["blendjob==0.1.16"])
def test_downloads_declared_wheels_for_target_platform(self):
pack = load_pack()
@@ -156,20 +156,20 @@ class ExtensionPackagingTest(unittest.TestCase):
def fake_run(command, check):
self.assertTrue(check)
(destination / "blendjob-0.1.14-py3-none-any.whl").write_bytes(b"wheel")
(destination / "blendjob-0.1.16-py3-none-any.whl").write_bytes(b"wheel")
with patch.object(pack.subprocess, "run", side_effect=fake_run) as run:
wheels = pack.download_wheels("linux-x64", destination)
command = run.call_args.args[0]
self.assertIn("blendjob==0.1.14", command)
self.assertIn("blendjob==0.1.16", command)
self.assertIn("--find-links", command)
self.assertIn(str(pack.SOURCE_DIR / "wheels"), command)
self.assertIn("--python-version=3.11", command)
self.assertIn("--platform=manylinux2014_x86_64", command)
self.assertEqual(
[wheel.name for wheel in wheels],
["blendjob-0.1.14-py3-none-any.whl"],
["blendjob-0.1.16-py3-none-any.whl"],
)
def test_rejects_unknown_platform(self):