mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-05 16:51:21 -08:00
a yet another method to restart webui
This commit is contained in:
parent
9d953c0e03
commit
333e63c091
5 changed files with 38 additions and 15 deletions
|
|
@ -841,3 +841,12 @@ def walk_files(path, allowed_extensions=None):
|
|||
continue
|
||||
|
||||
yield os.path.join(root, filename)
|
||||
|
||||
|
||||
def restart_program():
|
||||
"""creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui again"""
|
||||
|
||||
with open(os.path.join(script_path, "tmp", "restart"), "w"):
|
||||
pass
|
||||
|
||||
os._exit(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue