From 2a6d11e645644faac1a8581c0218ca5e8a59357d Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 8 Jun 2023 07:17:54 -0400 Subject: [PATCH] create databases directory on startup --- invokeai/app/api/dependencies.py | 1 + invokeai/app/cli_app.py | 1 + invokeai/backend/model_management/model_manager.py | 8 +------- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/invokeai/app/api/dependencies.py b/invokeai/app/api/dependencies.py index f67bc94412..01dd6daa74 100644 --- a/invokeai/app/api/dependencies.py +++ b/invokeai/app/api/dependencies.py @@ -57,6 +57,7 @@ class ApiDependencies: # TODO: build a file/path manager? db_location = config.db_path + db_location.parent.mkdir(parents=True,exist_ok=True) graph_execution_manager = SqliteItemStorage[GraphExecutionState]( filename=db_location, table_name="graph_executions" diff --git a/invokeai/app/cli_app.py b/invokeai/app/cli_app.py index cc987c4e1c..d9dec16b32 100644 --- a/invokeai/app/cli_app.py +++ b/invokeai/app/cli_app.py @@ -220,6 +220,7 @@ def invoke_cli(): db_location = ":memory:" else: db_location = config.db_path + db_location.parent.mkdir(parents=True,exist_ok=True) logger.info(f'InvokeAI database location is "{db_location}"') diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index ed73d49965..4fcc4dee8d 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -320,11 +320,7 @@ class ModelManager(object): models = {} for name in sorted(self.config, key=str.casefold): stanza = self.config[name] - - with open('log.txt','a') as file: - print(f'DEBUG: name={name}; stanza = {stanza}',file=file) - - + # don't include VAEs in listing (legacy style) if "config" in stanza and "/VAE/" in stanza["config"]: continue @@ -1355,8 +1351,6 @@ class ModelManager(object): short_names = OmegaConf.load(Dataset_path).get('lora') or {} for name in model_names: - print(name) - name = short_names.get(name) or name # HuggingFace style LoRA