diff --git a/installer/lib/installer.py b/installer/lib/installer.py index 42079cd90c..96d8ce55e3 100644 --- a/installer/lib/installer.py +++ b/installer/lib/installer.py @@ -247,8 +247,8 @@ class InvokeAiInstance: pip[ "install", "--require-virtualenv", - "torch", - "torchvision", + "torch~=2.0.0", + "torchvision>=0.14.1", "--force-reinstall", "--find-links" if find_links is not None else None, find_links, diff --git a/invokeai/app/api_app.py b/invokeai/app/api_app.py index f935de542e..2dc97df273 100644 --- a/invokeai/app/api_app.py +++ b/invokeai/app/api_app.py @@ -126,7 +126,6 @@ app.openapi = custom_openapi # Override API doc favicons app.mount("/static", StaticFiles(directory="static/dream_web"), name="static") - @app.get("/docs", include_in_schema=False) def overridden_swagger(): return get_swagger_ui_html( @@ -144,6 +143,8 @@ def overridden_redoc(): redoc_favicon_url="/static/favicon.ico", ) +# Must mount *after* the other routes else it borks em +app.mount("/", StaticFiles(directory="invokeai/frontend/web/dist", html=True), name="ui") def invoke_api(): # Start our own event loop for eventing usage diff --git a/invokeai/app/services/image_storage.py b/invokeai/app/services/image_storage.py index c5e5cf8a8e..e2593dd473 100644 --- a/invokeai/app/services/image_storage.py +++ b/invokeai/app/services/image_storage.py @@ -270,4 +270,5 @@ class DiskImageStorage(ImageStorageBase): ) # TODO: this should refresh position for LRU cache if len(self.__cache) > self.__max_cache_size: cache_id = self.__cache_ids.get() - del self.__cache[cache_id] + if cache_id in self.__cache: + del self.__cache[cache_id] diff --git a/invokeai/frontend/web/src/i18n.ts b/invokeai/frontend/web/src/i18n.ts index faa30f7289..ed71d583b3 100644 --- a/invokeai/frontend/web/src/i18n.ts +++ b/invokeai/frontend/web/src/i18n.ts @@ -3,7 +3,7 @@ import LanguageDetector from 'i18next-browser-languagedetector'; import Backend from 'i18next-http-backend'; import { initReactI18next } from 'react-i18next'; -import translationEN from '../dist/locales/en.json'; +import translationEN from '../public/locales/en.json'; if (import.meta.env.MODE === 'package') { i18n.use(initReactI18next).init({ diff --git a/pyproject.toml b/pyproject.toml index 38547d0d11..82130e7640 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,9 +38,9 @@ dependencies = [ "albumentations", "click", "clip_anytorch", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip", - "compel==1.0.5", + "compel~=1.1.5", "datasets", - "diffusers[torch]==0.15.1", + "diffusers[torch]~=0.16.1", "dnspython==2.2.1", "einops", "eventlet", @@ -73,7 +73,7 @@ dependencies = [ "scikit-image>=0.19", "send2trash", "test-tube>=0.7.5", - "torch>=1.13.1", + "torch~=2.0.0", "torchvision>=0.14.1", "torchmetrics", "transformers~=4.26", @@ -93,7 +93,7 @@ dependencies = [ ] "test" = ["pytest>6.0.0", "pytest-cov"] "xformers" = [ - "xformers~=0.0.16; sys_platform!='darwin'", + "xformers~=0.0.19; sys_platform!='darwin'", "triton; sys_platform=='linux'", ]