From 30f2e3565840544dd66470c6ef216ec664db6432 Mon Sep 17 00:00:00 2001 From: DepFA <35278260+dfaker@users.noreply.github.com> Date: Sat, 1 Oct 2022 22:50:03 +0100 Subject: [PATCH] add importlib.reload --- webui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webui.py b/webui.py index e2c4c2ba..ab200045 100644 --- a/webui.py +++ b/webui.py @@ -1,7 +1,7 @@ import os import threading import time - +import importlib from modules import devices from modules.paths import script_path import signal @@ -116,8 +116,10 @@ def webui(): time.sleep(0.5) break - print('Reloading Scripts') + print('Reloading Custom Scripts') modules.scripts.reload_scripts(os.path.join(script_path, "scripts")) + print('Reloading modules: modules.ui') + importlib.reload(modules.ui) print('Restarting Gradio')