diff --git a/ldm/invoke/args.py b/ldm/invoke/args.py index c5b1987924..4d5ea7b5cc 100644 --- a/ldm/invoke/args.py +++ b/ldm/invoke/args.py @@ -174,7 +174,7 @@ class Args(object): sysargs = sys.argv[1:] # pre-parse to get the root directory; ignore the rest switches = self._arg_parser.parse_args(sysargs) - Globals.root = switches.root_dir or Globals.root + Globals.root = os.path.abspath(switches.root_dir or Globals.root) # now use root directory to find the init file initfile = os.path.expanduser(os.path.join(Globals.root,Globals.initfile)) diff --git a/ldm/invoke/globals.py b/ldm/invoke/globals.py index 2e9f9f14bd..c97ae1494e 100644 --- a/ldm/invoke/globals.py +++ b/ldm/invoke/globals.py @@ -16,7 +16,7 @@ from argparse import Namespace Globals = Namespace() # This is usually overwritten by the command line and/or environment variables -Globals.root = os.environ.get('INVOKEAI_ROOT') or os.path.expanduser('~/invokeai') +Globals.root = os.path.abspath(os.environ.get('INVOKEAI_ROOT') or os.path.expanduser('~/invokeai')) # Where to look for the initialization file Globals.initfile = 'invokeai.init'