diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-06-27 08:41:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 08:41:36 +0300 |
commit | 3e76ae5f50836324cbacd0554595285731be38a3 (patch) | |
tree | 02e1a2d04b7dc46d09f82a31d4bdf5535fa966d8 /webui.py | |
parent | f005efae721e0dbb46c49b559011ee757cd162fb (diff) | |
parent | 2e1710d88edc1e1a08b01c063fa386b50e5abc30 (diff) |
Merge pull request #11146 from AUTOMATIC1111/api-quit-restart
api quit restart
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -11,7 +11,7 @@ import json from threading import Thread
from typing import Iterable
-from fastapi import FastAPI, Response
+from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.gzip import GZipMiddleware
from packaging import version
@@ -362,11 +362,6 @@ def api_only(): api.launch(server_name="0.0.0.0" if cmd_opts.listen else "127.0.0.1", port=cmd_opts.port if cmd_opts.port else 7861)
-def stop_route(request):
- shared.state.server_command = "stop"
- return Response("Stopping.")
-
-
def webui():
launch_api = cmd_opts.api
initialize()
@@ -404,8 +399,6 @@ def webui(): "redoc_url": "/redoc",
},
)
- if cmd_opts.add_stop_route:
- app.add_route("/_stop", stop_route, methods=["POST"])
# after initial launch, disable --autolaunch for subsequent restarts
cmd_opts.autolaunch = False
|