diff --git a/invokeai/app/services/model_install/model_install_default.py b/invokeai/app/services/model_install/model_install_default.py index 51c4878709..b3c6015f4d 100644 --- a/invokeai/app/services/model_install/model_install_default.py +++ b/invokeai/app/services/model_install/model_install_default.py @@ -20,6 +20,7 @@ from invokeai.app.services.download import DownloadJob, DownloadQueueServiceBase from invokeai.app.services.events.events_base import EventServiceBase from invokeai.app.services.invoker import Invoker from invokeai.app.services.model_records import DuplicateModelException, ModelRecordServiceBase +from invokeai.app.util.misc import uuid_string from invokeai.backend.model_manager.config import ( AnyModelConfig, BaseModelType, @@ -149,7 +150,7 @@ class ModelInstallService(ModelInstallServiceBase): config = config or {} if not config.get("source"): config["source"] = model_path.resolve().as_posix() - config["key"] = config.get("key", self._create_key()) + config["key"] = config.get("key", uuid_string()) info: AnyModelConfig = self._probe_model(Path(model_path), config) @@ -530,7 +531,7 @@ class ModelInstallService(ModelInstallServiceBase): ) -> str: # Note that we may be passed a pre-populated AnyModelConfig object, # in which case the key field should have been populated by the caller (e.g. in `install_path`). - config["key"] = config.get("key", self._create_key()) + config["key"] = config.get("key", uuid_string()) info = info or ModelProbe.probe(model_path, config) override_key: Optional[str] = config.get("key") if config else None