diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-30 11:54:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 11:54:31 +0000 |
commit | 4b6eb8072b7e20ea3e92615bd30efd6d6f7b6c8f (patch) | |
tree | c962d5cec40782bbdb50b2e069e567e74d5f8375 | |
parent | 908fb4ea71ef1cb8404cce705d749adec7615abc (diff) | |
parent | edfae95d90a49ea95394b772817a59dde4175222 (diff) | |
download | stable-diffusion-webui-gfx803-4b6eb8072b7e20ea3e92615bd30efd6d6f7b6c8f.tar.gz stable-diffusion-webui-gfx803-4b6eb8072b7e20ea3e92615bd30efd6d6f7b6c8f.tar.bz2 stable-diffusion-webui-gfx803-4b6eb8072b7e20ea3e92615bd30efd6d6f7b6c8f.zip |
Merge pull request #14407 from AUTOMATIC1111/prevent-crash-due-to-Script-__init__-exception
prevent crash due to Script __init__ exception
-rw-r--r-- | modules/scripts.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index b6fcf96e..3a766911 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -566,7 +566,12 @@ class ScriptRunner: auto_processing_scripts = scripts_auto_postprocessing.create_auto_preprocessing_script_data()
for script_data in auto_processing_scripts + scripts_data:
- script = script_data.script_class()
+ try:
+ script = script_data.script_class()
+ except Exception:
+ errors.report(f"Error # failed to initialize Script {script_data.module}: ", exc_info=True)
+ continue
+
script.filename = script_data.path
script.is_txt2img = not is_img2img
script.is_img2img = is_img2img
|