Commit
·
818f705
1
Parent(s):
d0e6dba
webui.py
CHANGED
|
@@ -7,7 +7,7 @@ from modules.cv2win32 import close_all_preview
|
|
| 7 |
|
| 8 |
|
| 9 |
def generate_clicked(prompt, negative_prompt, style_selction, performance_selction,
|
| 10 |
-
aspect_ratios_selction, image_number, image_seed):
|
| 11 |
|
| 12 |
p_txt, n_txt = apply_style(style_selction, prompt, negative_prompt)
|
| 13 |
|
|
@@ -25,7 +25,7 @@ def generate_clicked(prompt, negative_prompt, style_selction, performance_selcti
|
|
| 25 |
if not isinstance(seed, int) or seed < 0 or seed > 65535:
|
| 26 |
seed = random.randint(1, 65535)
|
| 27 |
|
| 28 |
-
for i in range(image_number):
|
| 29 |
imgs = process(p_txt, n_txt, steps, switch, width, height, seed)
|
| 30 |
seed += 1
|
| 31 |
results += imgs
|
|
@@ -34,7 +34,7 @@ def generate_clicked(prompt, negative_prompt, style_selction, performance_selcti
|
|
| 34 |
return results
|
| 35 |
|
| 36 |
|
| 37 |
-
block = gr.Blocks()
|
| 38 |
with block:
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column():
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
def generate_clicked(prompt, negative_prompt, style_selction, performance_selction,
|
| 10 |
+
aspect_ratios_selction, image_number, image_seed, progress=gr.Progress()):
|
| 11 |
|
| 12 |
p_txt, n_txt = apply_style(style_selction, prompt, negative_prompt)
|
| 13 |
|
|
|
|
| 25 |
if not isinstance(seed, int) or seed < 0 or seed > 65535:
|
| 26 |
seed = random.randint(1, 65535)
|
| 27 |
|
| 28 |
+
for i in progress.tqdm(range(image_number)):
|
| 29 |
imgs = process(p_txt, n_txt, steps, switch, width, height, seed)
|
| 30 |
seed += 1
|
| 31 |
results += imgs
|
|
|
|
| 34 |
return results
|
| 35 |
|
| 36 |
|
| 37 |
+
block = gr.Blocks().queue()
|
| 38 |
with block:
|
| 39 |
with gr.Row():
|
| 40 |
with gr.Column():
|