diff --git a/invokeai/app/api_app.py b/invokeai/app/api_app.py index 0c72b1532e..7a2e30ea11 100644 --- a/invokeai/app/api_app.py +++ b/invokeai/app/api_app.py @@ -233,9 +233,9 @@ def invoke_api() -> None: else: return port - from invokeai.backend.install.check_root import check_invokeai_root + from invokeai.backend.install.check_root import check_directories - check_invokeai_root(app_config) # note, may exit with an exception if root not set up + check_directories(app_config) # note, may exit with an exception if root not set up if app_config.dev_reload: try: diff --git a/invokeai/backend/install/check_root.py b/invokeai/backend/install/check_root.py index ee8f6c4b6d..d3b80025ba 100644 --- a/invokeai/backend/install/check_root.py +++ b/invokeai/backend/install/check_root.py @@ -8,19 +8,19 @@ from invokeai.app.services.config import InvokeAIAppConfig # TODO(psyche): Should this also check for things like ESRGAN models, database, etc? -def validate_root_structure(config: InvokeAIAppConfig) -> None: +def validate_directories(config: InvokeAIAppConfig) -> None: assert config.db_path.parent.exists(), f"{config.db_path.parent} not found" assert config.models_path.exists(), f"{config.models_path} not found" -def check_invokeai_root(config: InvokeAIAppConfig): +def check_directories(config: InvokeAIAppConfig): try: - validate_root_structure(config) + validate_directories(config) except Exception as e: print() print(f"An exception has occurred: {str(e)}") print("== STARTUP ABORTED ==") - print("** One or more necessary files is missing from your InvokeAI root directory **") + print("** One or more necessary files is missing from your InvokeAI directories **") print("** Please rerun the configuration script to fix this problem. **") print("** From the launcher, selection option [6]. **") print( diff --git a/invokeai/frontend/install/model_install.py b/invokeai/frontend/install/model_install.py index 5201057ca0..fb16af1214 100644 --- a/invokeai/frontend/install/model_install.py +++ b/invokeai/frontend/install/model_install.py @@ -25,7 +25,7 @@ from npyscreen import widget from invokeai.app.services.config.config_default import get_config from invokeai.app.services.model_install import ModelInstallServiceBase -from invokeai.backend.install.check_root import validate_root_structure +from invokeai.backend.install.check_root import validate_directories from invokeai.backend.install.install_helper import InstallHelper, InstallSelections, UnifiedModelInfo from invokeai.backend.model_manager import ModelType from invokeai.backend.util import choose_precision, choose_torch_device @@ -611,7 +611,7 @@ def main() -> None: logger = InvokeAILogger().get_logger(config=config) try: - validate_root_structure(config) + validate_directories(config) except AssertionError: logger.info("Your InvokeAI root directory is not set up. Calling invokeai-configure.") sys.argv = ["invokeai_configure", "--yes", "--skip-sd-weights"]