diff --git a/invokeai/backend/config/invokeai_configure.py b/invokeai/backend/config/invokeai_configure.py index 59f11d35bc..1ebb2471aa 100755 --- a/invokeai/backend/config/invokeai_configure.py +++ b/invokeai/backend/config/invokeai_configure.py @@ -35,15 +35,19 @@ from transformers import ( CLIPTextModel, CLIPTokenizer, ) - import invokeai.configs as configs +from invokeai.app.services.config import ( + get_invokeai_config, + InvokeAIAppConfig, +) from invokeai.frontend.install.model_install import addModelsForm, process_and_execute from invokeai.frontend.install.widgets import ( CenteredButtonPress, IntTitleSlider, set_min_terminal_size, ) + from invokeai.backend.config.legacy_arg_parsing import legacy_parser from invokeai.backend.config.model_install_backend import ( default_dataset, @@ -51,10 +55,6 @@ from invokeai.backend.config.model_install_backend import ( hf_download_with_resume, recommended_datasets, ) -from invokeai.app.services.config import ( - get_invokeai_config, - InvokeAIAppConfig, -) warnings.filterwarnings("ignore") @@ -62,7 +62,8 @@ transformers.logging.set_verbosity_error() # --------------------------globals----------------------- -config = get_invokeai_config() + +config = get_invokeai_config(argv=[]) Model_dir = "models" Weights_dir = "ldm/stable-diffusion-v1/" @@ -699,7 +700,7 @@ def write_opts(opts: Namespace, init_file: Path): """ # this will load current settings - config = InvokeAIAppConfig() + config = InvokeAIAppConfig(argv=[]) for key,value in opts.__dict__.items(): if hasattr(config,key): setattr(config,key,value) @@ -820,7 +821,7 @@ def main(): if old_init_file.exists() and not new_init_file.exists(): print('** Migrating invokeai.init to invokeai.yaml') migrate_init_file(old_init_file) - config = get_invokeai_config() # reread defaults + config = get_invokeai_config(argv=[]) # reread defaults if not config.model_conf_path.exists(): diff --git a/invokeai/backend/config/model_install_backend.py b/invokeai/backend/config/model_install_backend.py index cb76f955bc..538ab61321 100644 --- a/invokeai/backend/config/model_install_backend.py +++ b/invokeai/backend/config/model_install_backend.py @@ -27,7 +27,7 @@ from ..stable_diffusion import StableDiffusionGeneratorPipeline warnings.filterwarnings("ignore") # --------------------------globals----------------------- -config = get_invokeai_config() +config = get_invokeai_config(argv=[]) Model_dir = "models" Weights_dir = "ldm/stable-diffusion-v1/" diff --git a/invokeai/frontend/install/model_install.py b/invokeai/frontend/install/model_install.py index a283b4952d..45ce11c686 100644 --- a/invokeai/frontend/install/model_install.py +++ b/invokeai/frontend/install/model_install.py @@ -46,7 +46,7 @@ from invokeai.app.services.config import get_invokeai_config MIN_COLS = 120 MIN_LINES = 45 -config = get_invokeai_config() +config = get_invokeai_config(argv=[]) class addModelsForm(npyscreen.FormMultiPage): # for responsive resizing - disabled