Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lcm realtime canvas painting #1043

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
make generate button non-interactive while rendering
prevents queue spam for too many updates
  • Loading branch information
mashb1t committed Nov 26, 2023
commit 088e99448b8d240e9670c9fde29a5f9df7708b64
4 changes: 2 additions & 2 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,11 @@ def inpaint_mode_change(mode):
ctrls += [realtime_input_image]
ctrls += ip_ctrls

generate_button.click(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=True, interactive=True), gr.update(visible=False), []), outputs=[stop_button, skip_button, generate_button, gallery]) \
generate_button.click(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=True, interactive=True), gr.update(visible=False, interactive=False), []), outputs=[stop_button, skip_button, generate_button, gallery]) \
.then(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \
.then(advanced_parameters.set_all_advanced_parameters, inputs=adps) \
.then(fn=generate_clicked, inputs=ctrls, outputs=[progress_html, progress_window, progress_gallery, gallery]) \
.then(lambda: (gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)), outputs=[generate_button, stop_button, skip_button]) \
.then(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=False), gr.update(visible=False)), outputs=[generate_button, stop_button, skip_button]) \
.then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')

for notification_file in ['notification.ogg', 'notification.mp3']:
Expand Down