|
41 | 41 | InvalidModelConfigException,
|
42 | 42 | ModelConfigFactory,
|
43 | 43 | )
|
44 |
| -from invokeai.backend.model_manager.legacy_probe import ModelProbe |
45 | 44 | from invokeai.backend.model_manager.metadata import (
|
46 | 45 | AnyModelRepoMetadata,
|
47 | 46 | HuggingFaceMetadataFetch,
|
@@ -601,22 +600,11 @@ def _probe(self, model_path: Path, config: Optional[ModelRecordChanges] = None):
|
601 | 600 | hash_algo = self._app_config.hashing_algorithm
|
602 | 601 | fields = config.model_dump()
|
603 | 602 |
|
604 |
| - # WARNING! |
605 |
| - # The legacy probe relies on the implicit order of tests to determine model classification. |
606 |
| - # This can lead to regressions between the legacy and new probes. |
607 |
| - # Do NOT change the order of `probe` and `classify` without implementing one of the following fixes: |
608 |
| - # Short-term fix: `classify` tests `matches` in the same order as the legacy probe. |
609 |
| - # Long-term fix: Improve `matches` to be more specific so that only one config matches |
610 |
| - # any given model - eliminating ambiguity and removing reliance on order. |
611 |
| - # After implementing either of these fixes, remove @pytest.mark.xfail from `test_regression_against_model_probe` |
612 |
| - try: |
613 |
| - return ModelProbe.probe(model_path=model_path, fields=deepcopy(fields), hash_algo=hash_algo) # type: ignore |
614 |
| - except InvalidModelConfigException: |
615 |
| - return ModelConfigFactory.from_model_on_disk( |
616 |
| - mod=model_path, |
617 |
| - overrides=deepcopy(fields), |
618 |
| - hash_algo=hash_algo, |
619 |
| - ) |
| 603 | + return ModelConfigFactory.from_model_on_disk( |
| 604 | + mod=model_path, |
| 605 | + overrides=deepcopy(fields), |
| 606 | + hash_algo=hash_algo, |
| 607 | + ) |
620 | 608 |
|
621 | 609 | def _register(
|
622 | 610 | self, model_path: Path, config: Optional[ModelRecordChanges] = None, info: Optional[AnyModelConfig] = None
|
|
0 commit comments