Skip to content

Commit a608340

Browse files
authored
Merge branch 'main' into patch-2
2 parents 8ce9b6c + 7fecebf commit a608340

File tree

13 files changed

+666
-60
lines changed

13 files changed

+666
-60
lines changed

installer/templates/invoke.bat.in

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ echo 6. Change InvokeAI startup options
1717
echo 7. Re-run the configure script to fix a broken install or to complete a major upgrade
1818
echo 8. Open the developer console
1919
echo 9. Update InvokeAI
20-
echo 10. Command-line help
20+
echo 10. Run the InvokeAI image database maintenance script
21+
echo 11. Command-line help
2122
echo Q - Quit
22-
set /P choice="Please enter 1-10, Q: [1] "
23+
set /P choice="Please enter 1-11, Q: [1] "
2324
if not defined choice set choice=1
2425
IF /I "%choice%" == "1" (
2526
echo Starting the InvokeAI browser-based UI..
@@ -58,8 +59,11 @@ IF /I "%choice%" == "1" (
5859
echo Running invokeai-update...
5960
python -m invokeai.frontend.install.invokeai_update
6061
) ELSE IF /I "%choice%" == "10" (
62+
echo Running the db maintenance script...
63+
python .venv\Scripts\invokeai-db-maintenance.exe
64+
) ELSE IF /I "%choice%" == "11" (
6165
echo Displaying command line help...
62-
python .venv\Scripts\invokeai.exe --help %*
66+
python .venv\Scripts\invokeai-web.exe --help %*
6367
pause
6468
exit /b
6569
) ELSE IF /I "%choice%" == "q" (

installer/templates/invoke.sh.in

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ do_choice() {
9797
;;
9898
10)
9999
clear
100-
printf "Command-line help\n"
101-
invokeai --help
100+
printf "Running the db maintenance script\n"
101+
invokeai-db-maintenance --root ${INVOKEAI_ROOT}
102102
;;
103-
"HELP 1")
103+
11)
104104
clear
105105
printf "Command-line help\n"
106-
invokeai --help
106+
invokeai-web --help
107107
;;
108108
*)
109109
clear
@@ -125,7 +125,10 @@ do_dialog() {
125125
6 "Change InvokeAI startup options"
126126
7 "Re-run the configure script to fix a broken install or to complete a major upgrade"
127127
8 "Open the developer console"
128-
9 "Update InvokeAI")
128+
9 "Update InvokeAI"
129+
10 "Run the InvokeAI image database maintenance script"
130+
11 "Command-line help"
131+
)
129132

130133
choice=$(dialog --clear \
131134
--backtitle "\Zb\Zu\Z3InvokeAI" \
@@ -157,9 +160,10 @@ do_line_input() {
157160
printf "7: Re-run the configure script to fix a broken install\n"
158161
printf "8: Open the developer console\n"
159162
printf "9: Update InvokeAI\n"
160-
printf "10: Command-line help\n"
163+
printf "10: Run the InvokeAI image database maintenance script\n"
164+
printf "11: Command-line help\n"
161165
printf "Q: Quit\n\n"
162-
read -p "Please enter 1-10, Q: [1] " yn
166+
read -p "Please enter 1-11, Q: [1] " yn
163167
choice=${yn:='1'}
164168
do_choice $choice
165169
clear

invokeai/app/api/sockets.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
from fastapi import FastAPI
44
from fastapi_events.handlers.local import local_handler
55
from fastapi_events.typing import Event
6-
from fastapi_socketio import SocketManager
6+
from socketio import ASGIApp, AsyncServer
77

88
from ..services.events import EventServiceBase
99

1010

1111
class SocketIO:
12-
__sio: SocketManager
12+
__sio: AsyncServer
13+
__app: ASGIApp
1314

1415
def __init__(self, app: FastAPI):
15-
self.__sio = SocketManager(app=app)
16+
self.__sio = AsyncServer(async_mode="asgi", cors_allowed_origins="*")
17+
self.__app = ASGIApp(socketio_server=self.__sio, socketio_path="socket.io")
18+
app.mount("/ws", self.__app)
1619

1720
self.__sio.on("subscribe_queue", handler=self._handle_sub_queue)
1821
self.__sio.on("unsubscribe_queue", handler=self._handle_unsub_queue)

0 commit comments

Comments
 (0)