mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 20:35:06 +08:00
API /sdapi/v1/server-reload-ui
This commit is contained in:
parent
04903af798
commit
a56190cdb1
@ -249,6 +249,7 @@ class Api:
|
|||||||
self.add_api_route("/sdapi/v1/server-kill", self.kill_webui, methods=["POST"])
|
self.add_api_route("/sdapi/v1/server-kill", self.kill_webui, methods=["POST"])
|
||||||
self.add_api_route("/sdapi/v1/server-restart", self.restart_webui, methods=["POST"])
|
self.add_api_route("/sdapi/v1/server-restart", self.restart_webui, methods=["POST"])
|
||||||
self.add_api_route("/sdapi/v1/server-stop", self.stop_webui, methods=["POST"])
|
self.add_api_route("/sdapi/v1/server-stop", self.stop_webui, methods=["POST"])
|
||||||
|
self.add_api_route("/sdapi/v1/server-reload-ui", self.reload_webui, methods=["POST"])
|
||||||
|
|
||||||
self.default_script_arg_txt2img = []
|
self.default_script_arg_txt2img = []
|
||||||
self.default_script_arg_img2img = []
|
self.default_script_arg_img2img = []
|
||||||
@ -926,3 +927,6 @@ class Api:
|
|||||||
shared.state.server_command = "stop"
|
shared.state.server_command = "stop"
|
||||||
return Response("Stopping.")
|
return Response("Stopping.")
|
||||||
|
|
||||||
|
def reload_webui(self):
|
||||||
|
shared.state.request_restart()
|
||||||
|
return Response("Reloading.")
|
||||||
|
Loading…
Reference in New Issue
Block a user