Refactor and clean up codebase by removing unused functions and reorganizing imports

- Removed unused model keys and functions from properties.py.
- Deleted projection.py as its functions were no longer needed.
- Cleaned up model_catalog.py by removing unused model directory function.
- Updated imports in various test files to reflect new module structure.
- Removed deprecated test cases related to image editing tools.
- Added new tests for ONNX runtime provider selection logic.
This commit is contained in:
2026-09-09 10:31:56 +08:00
parent 4c902ed7db
commit f5aff50b13
47 changed files with 460 additions and 413 deletions

View File

@@ -67,16 +67,6 @@ class Moge2OnnxTest(unittest.TestCase):
def setUpClass(cls):
cls.moge = load_module()
def test_auto_provider_prefers_accelerated_runtime(self):
providers = self.moge.select_providers(
"auto",
["CPUExecutionProvider", "DmlExecutionProvider"],
)
self.assertEqual(
providers,
["DmlExecutionProvider", "CPUExecutionProvider"],
)
def test_coreml_session_requires_static_input_partitions(self):
calls = []
@@ -107,13 +97,6 @@ class Moge2OnnxTest(unittest.TestCase):
],
)
def test_explicit_unavailable_provider_falls_back_to_cpu(self):
providers = self.moge.select_providers(
"cuda",
["CPUExecutionProvider"],
)
self.assertEqual(providers, ["CPUExecutionProvider"])
def test_infer_uses_dynamic_token_input_and_numpy_postprocess(self):
height, width = 8, 12