diff --git a/invokeai/app/services/config.py b/invokeai/app/services/config.py index c119f2f74c..7b5015a670 100644 --- a/invokeai/app/services/config.py +++ b/invokeai/app/services/config.py @@ -414,6 +414,7 @@ class InvokeAIAppConfig(InvokeAISettings): outdir : Path = Field(default='outputs', description='Default folder for output images', category='Paths') from_file : Path = Field(default=None, description='Take command input from the indicated file (command-line client only)', category='Paths') use_memory_db : bool = Field(default=False, description='Use in-memory database for storing image metadata', category='Paths') + ignore_missing_core_models : bool = Field(default=False, description='Ignore missing models in models/core/convert') model : str = Field(default='stable-diffusion-1.5', description='Initial model name', category='Models') diff --git a/invokeai/backend/install/check_root.py b/invokeai/backend/install/check_root.py index ded9e66635..cde53f7100 100644 --- a/invokeai/backend/install/check_root.py +++ b/invokeai/backend/install/check_root.py @@ -12,16 +12,17 @@ def check_invokeai_root(config: InvokeAIAppConfig): assert config.model_conf_path.exists(), f"{config.model_conf_path} not found" assert config.db_path.parent.exists(), f"{config.db_path.parent} not found" assert config.models_path.exists(), f"{config.models_path} not found" - for model in [ - "CLIP-ViT-bigG-14-laion2B-39B-b160k", - "bert-base-uncased", - "clip-vit-large-patch14", - "sd-vae-ft-mse", - "stable-diffusion-2-clip", - "stable-diffusion-safety-checker", - ]: - path = config.models_path / f"core/convert/{model}" - assert path.exists(), f"{path} is missing" + if not config.ignore_missing_core_models: + for model in [ + "CLIP-ViT-bigG-14-laion2B-39B-b160k", + "bert-base-uncased", + "clip-vit-large-patch14", + "sd-vae-ft-mse", + "stable-diffusion-2-clip", + "stable-diffusion-safety-checker", + ]: + path = config.models_path / f"core/convert/{model}" + assert path.exists(), f"{path} is missing" except Exception as e: print() print(f"An exception has occurred: {str(e)}") @@ -32,5 +33,6 @@ def check_invokeai_root(config: InvokeAIAppConfig): print( '** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" **' ) + print('** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not recommended.)') input("Press any key to continue...") sys.exit(0)