another fix to #815
This commit is contained in:
parent
867402e3df
commit
6364bb37cf
@ -1 +1 @@
|
|||||||
version = '2.1.759'
|
version = '2.1.760'
|
||||||
|
7
webui.py
7
webui.py
@ -41,6 +41,13 @@ def generate_clicked(*args):
|
|||||||
if len(worker.outputs) > 0:
|
if len(worker.outputs) > 0:
|
||||||
flag, product = worker.outputs.pop(0)
|
flag, product = worker.outputs.pop(0)
|
||||||
if flag == 'preview':
|
if flag == 'preview':
|
||||||
|
|
||||||
|
# help bad internet connection by skipping duplicated preview
|
||||||
|
if len(worker.outputs) > 0: # if we have the next item
|
||||||
|
if worker.outputs[0][0] == 'preview': # if the next item is also a preview
|
||||||
|
print('Skipped one preview for better internet connection.')
|
||||||
|
continue
|
||||||
|
|
||||||
percentage, title, image = product
|
percentage, title, image = product
|
||||||
yield gr.update(visible=True, value=modules.html.make_progress_html(percentage, title)), \
|
yield gr.update(visible=True, value=modules.html.make_progress_html(percentage, title)), \
|
||||||
gr.update(visible=True, value=image) if image is not None else gr.update(), \
|
gr.update(visible=True, value=image) if image is not None else gr.update(), \
|
||||||
|
Loading…
Reference in New Issue
Block a user