Skip to content

Commit 907d960

Browse files
committed
PR suggestions
1 parent bfdace6 commit 907d960

File tree

3 files changed

+128
-197
lines changed

3 files changed

+128
-197
lines changed

Diff for: invokeai/app/services/model_install/model_install_default.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,14 @@ def _move_model(self, old_path: Path, new_path: Path) -> Path:
645645

646646
def _probe(self, model_path: Path, config: Optional[ModelRecordChanges] = None):
647647
config = config or ModelRecordChanges()
648-
overrides = config.model_dump()
648+
hash_algo = self._app_config.hashing_algorithm
649+
fields = config.model_dump()
650+
overrides = {"hash_algo": hash_algo, **fields}
651+
649652
try:
650653
return ModelConfigBase.classify(model_path, **overrides)
651654
except InvalidModelConfigException:
652-
return ModelProbe.probe(
653-
model_path=model_path, fields=overrides, hash_algo=self._app_config.hashing_algorithm
654-
) # type: ignore
655+
return ModelProbe.probe(model_path=model_path, fields=fields, hash_algo=hash_algo) # type: ignore
655656

656657
def _register(
657658
self, model_path: Path, config: Optional[ModelRecordChanges] = None, info: Optional[AnyModelConfig] = None

0 commit comments

Comments
 (0)