stable-diffusion-webui
stable-diffusion-webui copied to clipboard
prevent crash due to Script __init__ exception
Description
a Script that for some reason fails to initialize can cause a webui to crash
for example a Script like this
from modules import scripts
class Script(scripts.Script):
def __init__(self):
assert False, 'This will crash webui'
this issue was brought to my attention by https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/14404 for whatever reason the this line in of code the extension triggers an uncaught exception and crashes web UI
Checklist:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests