Replace state.need_restart with state.server_command + replace poll loop with signal

This commit is contained in:
Aarni Koskela
2023-05-11 23:46:45 +03:00
parent 4b07f2f584
commit 85b4f89926
4 changed files with 68 additions and 26 deletions

View File

@@ -1609,12 +1609,8 @@ def create_ui():
outputs=[]
)
def request_restart():
shared.state.interrupt()
shared.state.need_restart = True
restart_gradio.click(
fn=request_restart,
fn=shared.state.request_restart,
_js='restart_reload',
inputs=[],
outputs=[],