[bug]: new logic for root directory detection may behave unpredictably on manual install
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:
--rootCLI flagINVOKEAI_ROOTVIRTUAL_ENV/..<< this is where the problem happens~/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
I agree, I just had difficulty reinstalling InvokeAI because of this exact reason. This isn't good UX at all.
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.
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.
can someone explain this to me like im dumb