From 11a44b944d942b85d493c7e90f3837ee736d894f Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Tue, 1 Aug 2023 01:29:29 -0400 Subject: [PATCH 1/3] fix installation documentation --- README.md | 13 ++++--------- docs/installation/020_INSTALL_MANUAL.md | 16 +++++++++------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 3ca1ca1f26..2efaacd031 100644 --- a/README.md +++ b/README.md @@ -184,8 +184,9 @@ the command `npm install -g yarn` if needed) 6. Configure InvokeAI and install a starting set of image generation models (you only need to do this once): ```terminal - invokeai-configure + invokeai-configure --root . ``` + Don't miss the dot at the end! 7. Launch the web server (do it every time you run InvokeAI): @@ -193,15 +194,9 @@ the command `npm install -g yarn` if needed) invokeai-web ``` -8. Build Node.js assets +8. Point your browser to http://localhost:9090 to bring up the web interface. - ```terminal - cd invokeai/frontend/web/ - yarn vite build - ``` - -9. Point your browser to http://localhost:9090 to bring up the web interface. -10. Type `banana sushi` in the box on the top left and click `Invoke`. +9. Type `banana sushi` in the box on the top left and click `Invoke`. Be sure to activate the virtual environment each time before re-launching InvokeAI, using `source .venv/bin/activate` or `.venv\Scripts\activate`. diff --git a/docs/installation/020_INSTALL_MANUAL.md b/docs/installation/020_INSTALL_MANUAL.md index c0fb4c046f..84f19da9bf 100644 --- a/docs/installation/020_INSTALL_MANUAL.md +++ b/docs/installation/020_INSTALL_MANUAL.md @@ -192,8 +192,10 @@ manager, please follow these steps: your outputs. ```terminal - invokeai-configure + invokeai-configure --root . ``` + + Don't miss the dot at the end of the command! The script `invokeai-configure` will interactively guide you through the process of downloading and installing the weights files needed for InvokeAI. @@ -225,12 +227,6 @@ manager, please follow these steps: !!! warning "Make sure that the virtual environment is activated, which should create `(.venv)` in front of your prompt!" - === "CLI" - - ```bash - invokeai - ``` - === "local Webserver" ```bash @@ -243,6 +239,12 @@ manager, please follow these steps: invokeai --web --host 0.0.0.0 ``` + === "CLI" + + ```bash + invokeai + ``` + If you choose the run the web interface, point your browser at http://localhost:9090 in order to load the GUI. From 242d860a472e92d132869f7d8951f43d1298df94 Mon Sep 17 00:00:00 2001 From: Zerdoumi <3418725+sohelzerdoumi@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:57:13 +0200 Subject: [PATCH 2/3] fix https/wss behind reverse proxy --- invokeai/frontend/web/src/services/events/middleware.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/services/events/middleware.ts b/invokeai/frontend/web/src/services/events/middleware.ts index 0c3b275274..75f2d48de8 100644 --- a/invokeai/frontend/web/src/services/events/middleware.ts +++ b/invokeai/frontend/web/src/services/events/middleware.ts @@ -12,8 +12,9 @@ import { socketSubscribed, socketUnsubscribed } from './actions'; export const socketMiddleware = () => { let areListenersSet = false; - - let socketUrl = `ws://${window.location.host}`; + + let wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'; + let socketUrl = `${wsProtocol}://${window.location.host}`; const socketOptions: Parameters[0] = { timeout: 60000, From 4599575e65db2081886b6782f961ddf68359aecb Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 2 Aug 2023 00:08:34 +1000 Subject: [PATCH 3/3] fix(ui): use `const` for `wsProtocol`, lint --- invokeai/frontend/web/src/services/events/middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/services/events/middleware.ts b/invokeai/frontend/web/src/services/events/middleware.ts index 75f2d48de8..56992be672 100644 --- a/invokeai/frontend/web/src/services/events/middleware.ts +++ b/invokeai/frontend/web/src/services/events/middleware.ts @@ -12,8 +12,8 @@ import { socketSubscribed, socketUnsubscribed } from './actions'; export const socketMiddleware = () => { let areListenersSet = false; - - let wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'; + + const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'; let socketUrl = `${wsProtocol}://${window.location.host}`; const socketOptions: Parameters[0] = {