John6666 commited on
Commit
0a7d027
β€’
1 Parent(s): 78f7a7f

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -153,7 +153,8 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
153
 
154
  for m, o in zip(current_models, output):
155
  gen_event = gr.on(triggers=[gen_button.click, txt_input.submit], fn=gen_fn,
156
- inputs=[m, txt_input, neg_input, height, width, steps, cfg, seed], outputs=[o], concurrency_limit=None, queue=False)
 
157
  o.change(add_gallery, [o, m, gallery], [gallery])
158
  #stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
159
 
@@ -202,7 +203,8 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
202
  gen_event2 = gr.on(triggers=[gen_button2.click, txt_input2.submit],
203
  fn=lambda i, n, m, t1, t2, n1, n2, n3, n4, n5: gen_fn(m, t1, t2, n1, n2, n3, n4, n5) if (i < n) else None,
204
  inputs=[img_i, num_images, model_choice2, txt_input2, neg_input2,
205
- height2, width2, steps2, cfg2, seed2], outputs=[o], concurrency_limit=None, queue=False)
 
206
  o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
207
  #stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
208
 
 
153
 
154
  for m, o in zip(current_models, output):
155
  gen_event = gr.on(triggers=[gen_button.click, txt_input.submit], fn=gen_fn,
156
+ inputs=[m, txt_input, neg_input, height, width, steps, cfg, seed], outputs=[o],
157
+ concurrency_limit=None, queue=False) # Be sure to delete ", queue=False" when activating the stop button
158
  o.change(add_gallery, [o, m, gallery], [gallery])
159
  #stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
160
 
 
203
  gen_event2 = gr.on(triggers=[gen_button2.click, txt_input2.submit],
204
  fn=lambda i, n, m, t1, t2, n1, n2, n3, n4, n5: gen_fn(m, t1, t2, n1, n2, n3, n4, n5) if (i < n) else None,
205
  inputs=[img_i, num_images, model_choice2, txt_input2, neg_input2,
206
+ height2, width2, steps2, cfg2, seed2], outputs=[o],
207
+ concurrency_limit=None, queue=False) # Be sure to delete ", queue=False" when activating the stop button
208
  o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
209
  #stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
210