Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
ef6b8123
Commit
ef6b8123
authored
Dec 02, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put code that can cause an exception into its own function for #14120
parent
5ed7daa3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
29 deletions
+33
-29
modules/scripts.py
modules/scripts.py
+33
-29
No files found.
modules/scripts.py
View file @
ef6b8123
...
@@ -560,18 +560,25 @@ class ScriptRunner:
...
@@ -560,18 +560,25 @@ class ScriptRunner:
on_after
.
clear
()
on_after
.
clear
()
def
create_script_ui
(
self
,
script
):
def
create_script_ui
(
self
,
script
):
import
modules.api.models
as
api_models
script
.
args_from
=
len
(
self
.
inputs
)
script
.
args_from
=
len
(
self
.
inputs
)
script
.
args_to
=
len
(
self
.
inputs
)
script
.
args_to
=
len
(
self
.
inputs
)
try
:
self
.
create_script_ui_inner
(
script
)
except
Exception
:
errors
.
report
(
f
"Error creating UI for {script.name}: "
,
exc_info
=
True
)
def
create_script_ui_inner
(
self
,
script
):
import
modules.api.models
as
api_models
controls
=
wrap_call
(
script
.
ui
,
script
.
filename
,
"ui"
,
script
.
is_img2img
)
controls
=
wrap_call
(
script
.
ui
,
script
.
filename
,
"ui"
,
script
.
is_img2img
)
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
=
[]
for
control
in
controls
:
for
control
in
controls
:
...
@@ -606,9 +613,6 @@ class ScriptRunner:
...
@@ -606,9 +613,6 @@ 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment