mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
catch uncaught exception with ui creation scripts
prevent total webui crash
This commit is contained in:
parent
f0f100e67b
commit
8a6e4bda21
@ -570,6 +570,7 @@ class ScriptRunner:
|
|||||||
if controls is None:
|
if controls is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
script.name = wrap_call(script.title, script.filename, "title", default=script.filename).lower()
|
script.name = wrap_call(script.title, script.filename, "title", default=script.filename).lower()
|
||||||
api_args = []
|
api_args = []
|
||||||
|
|
||||||
@ -605,6 +606,9 @@ class ScriptRunner:
|
|||||||
self.inputs += controls
|
self.inputs += controls
|
||||||
script.args_to = len(self.inputs)
|
script.args_to = len(self.inputs)
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
errors.report(f"Error creating UI for {script.name}: ", exc_info=True)
|
||||||
|
|
||||||
def setup_ui_for_section(self, section, scriptlist=None):
|
def setup_ui_for_section(self, section, scriptlist=None):
|
||||||
if scriptlist is None:
|
if scriptlist is None:
|
||||||
scriptlist = self.alwayson_scripts
|
scriptlist = self.alwayson_scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user