Spaces:
Runtime error
Runtime error
Update webui.py
Browse files
webui.py
CHANGED
|
@@ -96,7 +96,7 @@ shared.gradio_root = gr.Blocks(
|
|
| 96 |
css=modules.html.css).queue()
|
| 97 |
|
| 98 |
with shared.gradio_root:
|
| 99 |
-
currentTask = gr.State(
|
| 100 |
with gr.Row():
|
| 101 |
with gr.Column(scale=2):
|
| 102 |
with gr.Row():
|
|
@@ -642,18 +642,16 @@ with shared.gradio_root:
|
|
| 642 |
metadata_import_button.click(trigger_metadata_import, inputs=[metadata_input_image, state_is_generating], outputs=load_data_outputs, queue=False, show_progress=True) \
|
| 643 |
.then(style_sorter.sort_styles, inputs=style_selections, outputs=style_selections, queue=False, show_progress=False)
|
| 644 |
|
| 645 |
-
"""
|
| 646 |
currentTask = None
|
| 647 |
generate_button.click(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), [], True),
|
| 648 |
outputs=[stop_button, skip_button, generate_button, gallery, state_is_generating]) \
|
| 649 |
.then(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \
|
| 650 |
-
.then(fn=get_task, inputs=ctrls, outputs=
|
| 651 |
-
.then(fn=generate_clicked, inputs=
|
| 652 |
.then(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), gr.update(visible=False, interactive=False), False),
|
| 653 |
outputs=[generate_button, stop_button, skip_button, state_is_generating]) \
|
| 654 |
.then(fn=update_history_link, outputs=history_link) \
|
| 655 |
.then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
|
| 656 |
-
"""
|
| 657 |
|
| 658 |
for notification_file in ['notification.ogg', 'notification.mp3']:
|
| 659 |
if os.path.exists(notification_file):
|
|
|
|
| 96 |
css=modules.html.css).queue()
|
| 97 |
|
| 98 |
with shared.gradio_root:
|
| 99 |
+
currentTask = gr.State()
|
| 100 |
with gr.Row():
|
| 101 |
with gr.Column(scale=2):
|
| 102 |
with gr.Row():
|
|
|
|
| 642 |
metadata_import_button.click(trigger_metadata_import, inputs=[metadata_input_image, state_is_generating], outputs=load_data_outputs, queue=False, show_progress=True) \
|
| 643 |
.then(style_sorter.sort_styles, inputs=style_selections, outputs=style_selections, queue=False, show_progress=False)
|
| 644 |
|
|
|
|
| 645 |
currentTask = None
|
| 646 |
generate_button.click(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), [], True),
|
| 647 |
outputs=[stop_button, skip_button, generate_button, gallery, state_is_generating]) \
|
| 648 |
.then(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \
|
| 649 |
+
.then(fn=get_task, inputs=ctrls, outputs=currentTask) \
|
| 650 |
+
.then(fn=generate_clicked, inputs=currentTask, outputs=[progress_html, progress_window, progress_gallery, gallery]) \
|
| 651 |
.then(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), gr.update(visible=False, interactive=False), False),
|
| 652 |
outputs=[generate_button, stop_button, skip_button, state_is_generating]) \
|
| 653 |
.then(fn=update_history_link, outputs=history_link) \
|
| 654 |
.then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
|
|
|
|
| 655 |
|
| 656 |
for notification_file in ['notification.ogg', 'notification.mp3']:
|
| 657 |
if os.path.exists(notification_file):
|