InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

ALERT - Directory structure change

Open lstein opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Contact Details

No response

What should this feature add?

As of 11 December 2022 I've merged changes into the main repository that affects how InvokeAI finds its runtime directory.

Previously, the CLI and Web tools looked first for a startup file named .invokeai and then looked for the --root_dir option inside this file to identify the runtime directory (containing models, config files and outputs). Finding this file was a challenge for new users and counterintuitive for many. In addition, support files for InvokeAI were scattered around in three places - the repo, the startup file and the runtime directory.

Everything has now been consolidated under a runtime directory named invokeai whose location is determined at install time. The invokeai directory contains the startup file, now named invokeai.init, and the startup code looks first for the runtime directory, and then for the startup file within this.

For users who launch InvokeAI using one of the launcher scripts (invoke.sh and invoke.bat) everything should continue to work. However, developers who run the code directly may have to make an adjustment:

  1. If your runtime directory is in $HOME/invokeai, then the code will find it automatically and you don't have to do anything new.
  2. If your runtime directory is somewhere else, including in the repo, then you will need to point invoke.py at its path using the --root_dir (abbreviated -root) argument, as in invoke.py --root_dir /temp/invokeai Alternatively you can set the environment variable INVOKEAI_ROOT once and forget about it.
  3. Startup args you've placed in $HOME/.invokeai will no longer be processed. Move this file to invokeai.init in the runtime directory.

I know this will be inconvenient, but ultimately it gives us a stabler package.

Alternatives

No response

Aditional Content

No response

lstein avatar Dec 11 '22 13:12 lstein