Update app.py
Browse files
app.py
CHANGED
@@ -112,12 +112,12 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
|
|
112 |
img_i = gr.Number(i, visible=False)
|
113 |
image_num.change(lambda i, n: gr.update(visible = (i < n)), [img_i, image_num], o, show_api=True)
|
114 |
gen_event = gr.on(triggers=[run_button.click, prompt.submit],
|
115 |
-
fn=lambda i, n, m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4: infer_fn(m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4) if (i < n) else None,
|
116 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
|
117 |
positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
118 |
outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
|
119 |
gen_event2 = gr.on(triggers=[random_button.click],
|
120 |
-
fn=lambda i, n, m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4: infer_rand_fn(m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4) if (i < n) else None,
|
121 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
|
122 |
positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
123 |
outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
|
|
|
112 |
img_i = gr.Number(i, visible=False)
|
113 |
image_num.change(lambda i, n: gr.update(visible = (i < n)), [img_i, image_num], o, show_api=True)
|
114 |
gen_event = gr.on(triggers=[run_button.click, prompt.submit],
|
115 |
+
fn=lambda i, n, m, p, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4: infer_fn(m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4) if (i < n) else None,
|
116 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
|
117 |
positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
118 |
outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
|
119 |
gen_event2 = gr.on(triggers=[random_button.click],
|
120 |
+
fn=lambda i, n, m, p, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4: infer_rand_fn(m, t1, t2, n1, n2, n3, n4, n5, l1, l2, l3, l4) if (i < n) else None,
|
121 |
inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
|
122 |
positive_prefix, positive_suffix, negative_prefix, negative_suffix],
|
123 |
outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
|