InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: If runtime directory exists, configuration script does not create the initfile

Open ebr opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

16

What happened?

Until recently, if the ~/.invokeai init file did not exist, the invoke.py script would automatically proceed to create the file (albeit without correct defaults), and continue to load the CLI or web UI.

After a recent change (possibly #1517?), the invoke.py script tries to run configure_invokeai.py to reconfigure the root dir. But if the model config directory already exists (specifically, it checks for the configs/stable-diffusion/v1-inference.yaml file), the logic in the configure script bypasses the code path that creates the initfile altogether.

This means if we're missing the init file, but have an existing runtime dir, the application can never load, because it goes into an infinite loop with emergency_model_reconfigure, looking for the initfile but never creating it.

Potential workaround is to comment out https://github.com/invoke-ai/InvokeAI/blob/development/scripts/configure_invokeai.py#L697, which causes full re-initialization of the runtime dir even if it exists.

Screenshots

No response

Additional context

No response

Contact Details

No response

ebr avatar Nov 29 '22 09:11 ebr

I started fixing this in #1615, but still not quite working because Args.parse_args() uses different logic for finding the init file. Can aim to finish it later today... :sleeping:

ebr avatar Nov 29 '22 09:11 ebr

Fixed somewhere along the way

ebr avatar Feb 04 '23 04:02 ebr