mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
make webGUI model changing work again
- Using relative root addresses was causing problems when the current working directory was changed after start time. - This commit makes the root address absolute at start time, such that changing the working directory later on doesn't break anything.
This commit is contained in:
parent
c857c6cc62
commit
e7144055d1
@ -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))
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user