Fix issues with '.' not being consisent when run using web gui.

This commit is contained in:
David Burnett 2022-11-20 15:03:54 +00:00 committed by Lincoln Stein
parent bc7ece771d
commit 602e35db65

View File

@ -44,7 +44,7 @@ def main():
args.max_loaded_models = 1
# alert - setting a global here
Globals.root = os.path.expanduser(args.root_dir or os.environ.get('INVOKEAI_ROOT') or '.')
Globals.root = os.path.expanduser(args.root_dir or os.environ.get('INVOKEAI_ROOT') or os.path.abspath('.'))
print(f'>> InvokeAI runtime directory is "{Globals.root}"')
# loading here to avoid long delays on startup