add script reload method

This commit is contained in:
DepFA 2022-10-01 18:30:53 +01:00 committed by GitHub
parent 3f417566b0
commit 4c2478a68a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,3 +165,12 @@ class ScriptRunner:
scripts_txt2img = ScriptRunner()
scripts_img2img = ScriptRunner()
def reload_scripts(basedir):
global scripts_txt2img,scripts_img2img
scripts_data.clear()
load_scripts(basedir)
scripts_txt2img = ScriptRunner()
scripts_img2img = ScriptRunner()