Fix --config arg not being recognized

This commit is contained in:
blessedcoolant 2022-12-16 10:39:16 +13:00
parent 69cc0993f8
commit ffa54f4a35

View File

@ -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}"')