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
c8c40c8a
Commit
c8c40c8a
authored
Nov 17, 2022
by
space-nuko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add interrupt button to preprocessing
parent
98947d17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
modules/textual_inversion/ui.py
modules/textual_inversion/ui.py
+1
-1
modules/ui.py
modules/ui.py
+9
-1
No files found.
modules/textual_inversion/ui.py
View file @
c8c40c8a
...
...
@@ -18,7 +18,7 @@ def create_embedding(name, initialization_text, nvpt, overwrite_old):
def
preprocess
(
*
args
):
modules
.
textual_inversion
.
preprocess
.
preprocess
(
*
args
)
return
"Preprocessing finished
."
,
""
return
f
"Preprocessing {'interrupted' if shared.state.interrupted else 'finished'}
."
,
""
def
train_embedding
(
*
args
):
...
...
modules/ui.py
View file @
c8c40c8a
...
...
@@ -1249,7 +1249,9 @@ def create_ui(wrap_gradio_gpu_call):
gr
.
HTML
(
value
=
""
)
with
gr
.
Column
():
run_preprocess
=
gr
.
Button
(
value
=
"Preprocess"
,
variant
=
'primary'
)
with
gr
.
Row
():
interrupt_preprocessing
=
gr
.
Button
(
"Interrupt"
)
run_preprocess
=
gr
.
Button
(
value
=
"Preprocess"
,
variant
=
'primary'
)
process_split
.
change
(
fn
=
lambda
show
:
gr_show
(
show
),
...
...
@@ -1422,6 +1424,12 @@ def create_ui(wrap_gradio_gpu_call):
outputs
=
[],
)
interrupt_preprocessing
.
click
(
fn
=
lambda
:
shared
.
state
.
interrupt
(),
inputs
=
[],
outputs
=
[],
)
def
create_setting_component
(
key
,
is_quicksettings
=
False
):
def
fun
():
return
opts
.
data
[
key
]
if
key
in
opts
.
data
else
opts
.
data_labels
[
key
]
.
default
...
...
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