fix finding the wheel when running from outside the installer directory

in case of calling python script instead of shell
This commit is contained in:
Eugene Brodsky 2023-02-03 19:13:02 -05:00
parent 0cc2a8176e
commit b5160321bf

View File

@ -284,7 +284,7 @@ class InvokeAiInstance:
if FF_USE_LOCAL_WHEEL:
# if no wheel, try to do a source install before giving up
try:
src = str(next(Path.cwd().glob("InvokeAI-*.whl")))
src = str(next(Path(__file__).parent.glob("InvokeAI-*.whl")))
except StopIteration:
try:
src = Path(__file__).parents[1].expanduser().resolve()