fix(config): set ignore_missing_core_models when provided as CLI arg

This commit is contained in:
psychedelicious 2024-03-18 21:24:42 +11:00
parent 1cb1b60b4c
commit 9fa9ebe386

View File

@ -411,6 +411,8 @@ def get_config() -> InvokeAIAppConfig:
# CLI args trump environment variables
if root := getattr(args, "root", None):
config.set_root(Path(root))
if ignore_missing_core_models := getattr(args, "ignore_missing_core_models", None):
config.ignore_missing_core_models = ignore_missing_core_models
# TODO(psyche): This shouldn't be wrapped in a try/catch. The configuration script imports a number of classes
# from throughout the app, which in turn call get_config(). At that time, there may not be a config file to