add workaround for changing prompt while generating (#1578)
This commit is contained in:
parent
7b5bced6c2
commit
986ab451cf
6
webui.py
6
webui.py
@ -525,7 +525,7 @@ with shared.gradio_root:
|
|||||||
loaded_json = None
|
loaded_json = None
|
||||||
|
|
||||||
if loaded_json is None:
|
if loaded_json is None:
|
||||||
return gr.update(), gr.update(visible=True), gr.update(visible=False)
|
return gr.update(), gr.update(), gr.update(visible=False)
|
||||||
|
|
||||||
return json.dumps(loaded_json), gr.update(visible=False), gr.update(visible=True)
|
return json.dumps(loaded_json), gr.update(visible=False), gr.update(visible=True)
|
||||||
|
|
||||||
@ -557,11 +557,11 @@ with shared.gradio_root:
|
|||||||
load_parameter_button
|
load_parameter_button
|
||||||
] + lora_ctrls, queue=False, show_progress=False)
|
] + lora_ctrls, queue=False, show_progress=False)
|
||||||
|
|
||||||
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(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \
|
||||||
.then(advanced_parameters.set_all_advanced_parameters, inputs=adps) \
|
.then(advanced_parameters.set_all_advanced_parameters, inputs=adps) \
|
||||||
.then(fn=generate_clicked, inputs=ctrls, outputs=[progress_html, progress_window, progress_gallery, gallery]) \
|
.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')
|
.then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
|
||||||
|
|
||||||
for notification_file in ['notification.ogg', 'notification.mp3']:
|
for notification_file in ['notification.ogg', 'notification.mp3']:
|
||||||
|
Loading…
Reference in New Issue
Block a user