Skip to content

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

@ebr

Description

@ebr

Is there an existing issue for this?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions