InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: new logic for root directory detection may behave unpredictably on manual install

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

No response

What happened?

Reported by some users in Discord; @keturn could you please confirm this is similar to what you're seeing?

When the virtual environment is not inside the runtime dir (likely on a development setup or manual install), and the runtime dir is not explicitly specified using one of the two supported methods, the program will assume in the parent directory of the .venv is the runtime dir. It then fails to find expected files, and drops into emergency_model_reconfigure. But that, having found the VIRTUAL_ENV directory, will try to set up the runtime dir in the parent of that directory, which is entirely unexpected and makes a mess....

Right now the order of precedence for rootdir location is:

  1. --root CLI flag
  2. INVOKEAI_ROOT
  3. VIRTUAL_ENV/.. << this is where the problem happens
  4. ~/invokeai

We can advise users to always specify --root or INVOKEAI_ROOT paths as a workaround. This is not great UX though.

As a solution (sorta) we could check if the parent of the .venv "looks like" the runtime dir, because it would have been set up that way by the installer (which is the case this check is trying to accommodate). We can accomplish this with the usual checks for invokeai.init, etc., and: 1) bail out if the checks fail, 2) display a message asking to explicitly set the location using one of the supported methods, because we have no way of determining it automatically. This could use future improvement, but at least avoids the messy .venv/.. situation) for now.

Screenshots

No response

Additional context

No response

Contact Details

No response

ebr avatar Dec 18 '22 06:12 ebr

I agree, I just had difficulty reinstalling InvokeAI because of this exact reason. This isn't good UX at all.

THEGOLDENPRO avatar Jan 01 '23 16:01 THEGOLDENPRO

It was previously possible to set up root in ~/.invokeai file, now it asks to move this file to ~/invokeai/invokeai.init, but the --root argument in this file is completely ignored, updating configuration format/location so often is horrible UX.

remixer-dec avatar Jan 27 '23 14:01 remixer-dec

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 13 '23 06:03 github-actions[bot]

can someone explain this to me like im dumb

santientlos avatar Dec 15 '23 05:12 santientlos