MrDrmm commited on
Commit
0bf88d1
·
verified ·
1 Parent(s): b6f82ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -114,12 +114,12 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
114
  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,
115
  inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
116
  positive_prefix, positive_suffix, negative_prefix, negative_suffix],
117
- outputs=[o], queue=False, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
118
  gen_event2 = gr.on(triggers=[random_button.click],
119
  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,
120
  inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
121
  positive_prefix, positive_suffix, negative_prefix, negative_suffix],
122
- outputs=[o], queue=False, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
123
  o.change(save_gallery, [o, results], [results, image_files], show_api=False)
124
  stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
125
 
 
114
  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,
115
  inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
116
  positive_prefix, positive_suffix, negative_prefix, negative_suffix],
117
+ outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
118
  gen_event2 = gr.on(triggers=[random_button.click],
119
  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,
120
  inputs=[img_i, image_num, model_name, prompt, neg_prompt, height, width, steps, cfg, seed,
121
  positive_prefix, positive_suffix, negative_prefix, negative_suffix],
122
+ outputs=[o], queue=True, show_api=False) # Be sure to delete ", queue=False" when activating the stop button
123
  o.change(save_gallery, [o, results], [results, image_files], show_api=False)
124
  stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
125