multimodalart HF staff commited on
Commit
ad4d288
β€’
1 Parent(s): b31f6c0

Replace then for success

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -200,22 +200,22 @@ with gr.Blocks(css=css) as app:
200
  check_prompt,
201
  inputs=[prompt],
202
  queue=False
203
- ).then(
204
  inference,
205
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, control_start, control_end, strength, seed, sampler],
206
  outputs=[result_image, share_group, used_seed]
207
- ).then(
208
  fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history, queue=False
209
  )
210
  run_btn.click(
211
  check_prompt,
212
  inputs=[prompt],
213
  queue=False
214
- ).then(
215
  inference,
216
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, control_start, control_end, strength, seed, sampler],
217
  outputs=[result_image, share_group, used_seed]
218
- ).then(
219
  fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history, queue=False
220
  )
221
  share_button.click(None, [], [], _js=share_js)
 
200
  check_prompt,
201
  inputs=[prompt],
202
  queue=False
203
+ ).success(
204
  inference,
205
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, control_start, control_end, strength, seed, sampler],
206
  outputs=[result_image, share_group, used_seed]
207
+ ).success(
208
  fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history, queue=False
209
  )
210
  run_btn.click(
211
  check_prompt,
212
  inputs=[prompt],
213
  queue=False
214
+ ).success(
215
  inference,
216
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, control_start, control_end, strength, seed, sampler],
217
  outputs=[result_image, share_group, used_seed]
218
+ ).success(
219
  fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history, queue=False
220
  )
221
  share_button.click(None, [], [], _js=share_js)