Skip to content

Commit 6176941

Browse files
jazzhaikupsychedelicious
authored andcommitted
Warning comment
1 parent af41dc8 commit 6176941

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

invokeai/app/services/model_install/model_install_default.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,13 @@ def _probe(self, model_path: Path, config: Optional[ModelRecordChanges] = None):
647647
hash_algo = self._app_config.hashing_algorithm
648648
fields = config.model_dump()
649649

650+
# WARNING!
651+
# The legacy probe relies on the implicit order of tests to determine model classification.
652+
# This can lead to regressions between the legacy and new probes.
653+
# Do NOT change the order of `probe` and `classify` without implementing one of the following fixes:
654+
# Short-term fix: `classify` tests `matches` in the same order as the legacy probe.
655+
# Long-term fix: Improve `matches` to be more specific so that only one config matches
656+
# any given model - eliminating ambiguity and removing reliance on order.
650657
try:
651658
return ModelProbe.probe(model_path=model_path, fields=fields, hash_algo=hash_algo) # type: ignore
652659
except InvalidModelConfigException:

0 commit comments

Comments
 (0)