Skip to content

Commit

Permalink
Merge pull request #14407 from AUTOMATIC1111/prevent-crash-due-to-Scr…
Browse files Browse the repository at this point in the history
…ipt-__init__-exception

prevent crash due to Script __init__ exception
  • Loading branch information
AUTOMATIC1111 authored Dec 30, 2023
2 parents 908fb4e + edfae95 commit 4b6eb80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,12 @@ def initialize_scripts(self, is_img2img):
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
Expand Down

0 comments on commit 4b6eb80

Please sign in to comment.