From 55d3f04476c3b8cc529ae49460e974ecb8aee454 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 31 Jul 2023 22:36:11 -0400 Subject: [PATCH] additional refactoring --- invokeai/app/services/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/app/services/config.py b/invokeai/app/services/config.py index 434ba47fc1..c119f2f74c 100644 --- a/invokeai/app/services/config.py +++ b/invokeai/app/services/config.py @@ -355,7 +355,7 @@ class InvokeAISettings(BaseSettings): def _find_root() -> Path: venv = Path(os.environ.get("VIRTUAL_ENV") or ".") if os.environ.get("INVOKEAI_ROOT"): - root = Path(os.environ.get("INVOKEAI_ROOT")).resolve() + root = Path(os.environ["INVOKEAI_ROOT"]) elif any([(venv.parent / x).exists() for x in [INIT_FILE, LEGACY_INIT_FILE]]): root = (venv.parent).resolve() else: @@ -473,7 +473,7 @@ class InvokeAIAppConfig(InvokeAISettings): if self.root: root = Path(self.root).expanduser().absolute() else: - root = self.find_root() + root = self.find_root().expanduser().absolute() self.root = root # insulate ourselves from relative paths that may change return root