mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
Merge pull request #10975 from AUTOMATIC1111/restart3
A yet another method to restart webui.
This commit is contained in:
@@ -852,3 +852,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)
|
||||
|
Reference in New Issue
Block a user