From ad3b8a1c41b8ab98b8b98c6364d13cb8b6d5fa88 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 30 Sep 2023 08:23:12 +0300 Subject: [PATCH] alternative solution to #13434 --- modules/restart.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/restart.py b/modules/restart.py index 18eacaf37..2dd6493b4 100644 --- a/modules/restart.py +++ b/modules/restart.py @@ -14,7 +14,9 @@ def is_restartable() -> bool: def restart_program() -> None: """creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui again""" - (Path(script_path) / "tmp" / "restart").touch() + tmpdir = Path(script_path) / "tmp" + tmpdir.mkdir(parents=True, exist_ok=True) + (tmpdir / "restart").touch() stop_program()