fix issue with invokeai.version

This commit is contained in:
Lincoln Stein 2023-03-03 01:34:38 -05:00
parent d606abc544
commit 955900507f
4 changed files with 5 additions and 13 deletions

View File

@ -291,7 +291,7 @@ class InvokeAiInstance:
src = Path(__file__).parents[1].expanduser().resolve() src = Path(__file__).parents[1].expanduser().resolve()
# if the above directory contains one of these files, we'll do a source install # if the above directory contains one of these files, we'll do a source install
next(src.glob("pyproject.toml")) next(src.glob("pyproject.toml"))
next(src.glob("ldm")) next(src.glob("invokeai"))
except StopIteration: except StopIteration:
print("Unable to find a wheel or perform a source install. Giving up.") print("Unable to find a wheel or perform a source install. Giving up.")
@ -342,14 +342,14 @@ class InvokeAiInstance:
introduction() introduction()
from ldm.invoke.config import invokeai_configure from invokeai.frontend.install import invokeai_configure
# NOTE: currently the config script does its own arg parsing! this means the command-line switches # NOTE: currently the config script does its own arg parsing! this means the command-line switches
# from the installer will also automatically propagate down to the config script. # from the installer will also automatically propagate down to the config script.
# this may change in the future with config refactoring! # this may change in the future with config refactoring!
succeeded = False succeeded = False
try: try:
invokeai_configure.main() invokeai_configure()
succeeded = True succeeded = True
except requests.exceptions.ConnectionError as e: except requests.exceptions.ConnectionError as e:
print(f'\nA network error was encountered during configuration and download: {str(e)}') print(f'\nA network error was encountered during configuration and download: {str(e)}')

View File

@ -15,7 +15,7 @@ if sys.platform == "darwin":
import pyparsing # type: ignore import pyparsing # type: ignore
import invokeai.version import invokeai.version as invokeai
from ...backend import Generate, ModelManager from ...backend import Generate, ModelManager
from ...backend.args import Args, dream_cmd_from_png, metadata_dumps, metadata_from_png from ...backend.args import Args, dream_cmd_from_png, metadata_dumps, metadata_from_png

View File

@ -3,7 +3,7 @@
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"prepare": "cd ../../ && husky install invokeai/frontend/.husky", "prepare": "cd ../../../ && husky install invokeai/frontend/web/.husky",
"dev": "vite dev", "dev": "vite dev",
"build": "tsc && vite build", "build": "tsc && vite build",
"preview": "vite preview", "preview": "vite preview",

View File

@ -1,19 +1,11 @@
""" """
initialization file for invokeai initialization file for invokeai
""" """
import invokeai
from .invokeai_version import __version__ from .invokeai_version import __version__
__app_id__ = "invoke-ai/InvokeAI" __app_id__ = "invoke-ai/InvokeAI"
__app_name__ = "InvokeAI" __app_name__ = "InvokeAI"
# copy these attributes into the invokeai namespace
setattr(invokeai, "__version__", __version__)
setattr(invokeai, "__app_id__", __app_id__)
setattr(invokeai, "__app_name__", __app_name__)
def _ignore_xformers_triton_message_on_windows(): def _ignore_xformers_triton_message_on_windows():
import logging import logging