Skip to content

Commit 6d24ca7

Browse files
authored
3.0.1post3 (#4082)
This is a relatively stable release that corrects the urgent windows install and model manager problems in 3.0.1. It still has two known bugs: 1. Many inpainting models are not loading correctly. 2. The merge script is failing to start.
2 parents 99823d5 + 2164da8 commit 6d24ca7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

invokeai/app/services/config.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def add_subparser(cls, parser: argparse.ArgumentParser):
274274
@classmethod
275275
def _excluded(self) -> List[str]:
276276
# internal fields that shouldn't be exposed as command line options
277-
return ["type", "initconf"]
277+
return ["type", "initconf", "cached_root"]
278278

279279
@classmethod
280280
def _excluded_from_yaml(self) -> List[str]:
@@ -290,6 +290,7 @@ def _excluded_from_yaml(self) -> List[str]:
290290
"restore",
291291
"root",
292292
"nsfw_checker",
293+
"cached_root",
293294
]
294295

295296
class Config:
@@ -423,6 +424,7 @@ class InvokeAIAppConfig(InvokeAISettings):
423424
log_level : Literal[tuple(["debug","info","warning","error","critical"])] = Field(default="info", description="Emit logging messages at this level or higher", category="Logging")
424425

425426
version : bool = Field(default=False, description="Show InvokeAI version and exit", category="Other")
427+
cached_root : Path = Field(default=None, description="internal use only", category="DEPRECATED")
426428
# fmt: on
427429

428430
def parse_args(self, argv: List[str] = None, conf: DictConfig = None, clobber=False):
@@ -470,10 +472,15 @@ def root_path(self) -> Path:
470472
"""
471473
Path to the runtime root directory
472474
"""
473-
if self.root:
474-
return Path(self.root).expanduser().absolute()
475+
# we cache value of root to protect against it being '.' and the cwd changing
476+
if self.cached_root:
477+
root = self.cached_root
478+
elif self.root:
479+
root = Path(self.root).expanduser().absolute()
475480
else:
476-
return self.find_root()
481+
root = self.find_root()
482+
self.cached_root = root
483+
return self.cached_root
477484

478485
@property
479486
def root_dir(self) -> Path:

0 commit comments

Comments
 (0)