diff --git a/ldm/invoke/CLI.py b/ldm/invoke/CLI.py index 565f21e389..6fc441aac6 100644 --- a/ldm/invoke/CLI.py +++ b/ldm/invoke/CLI.py @@ -48,11 +48,12 @@ def main(): # alert - setting a global here Globals.try_patchmatch = args.patchmatch - if not os.path.exists(os.path.join(Globals.root,'configs','models.yaml')): - print(f"\n** Error. The file {os.path.join(Globals.root,'configs','models.yaml')} could not be found.") - print(f'** Please check the location of your invokeai directory and use the --root_dir option to point to the correct path.') - print(f'** This script will now exit.') - sys.exit(-1) + if not args.conf: + if not os.path.exists(os.path.join(Globals.root,'configs','models.yaml')): + print(f"\n** Error. The file {os.path.join(Globals.root,'configs','models.yaml')} could not be found.") + print(f'** Please check the location of your invokeai directory and use the --root_dir option to point to the correct path.') + print(f'** This script will now exit.') + sys.exit(-1) print(f'>> InvokeAI runtime directory is "{Globals.root}"')