multimodalart HF staff commited on
Commit
0c6feea
1 Parent(s): 68ea3f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -587,8 +587,16 @@ with gr.Blocks(css="custom.css") as demo:
587
  # queue=False,
588
  # show_progress=False
589
  #)
590
- gr.on(
591
- triggers=[prompt.submit, button.click],
 
 
 
 
 
 
 
 
592
  fn=check_selected,
593
  inputs=[selected_state, custom_loaded_lora],
594
  show_progress=False
@@ -597,7 +605,6 @@ with gr.Blocks(css="custom.css") as demo:
597
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, aspect_ratio, gr_sdxl_loras, custom_loaded_lora],
598
  outputs=[result, share_group],
599
  )
600
-
601
  share_button.click(None, [], [], js=share_js)
602
  demo.load(fn=classify_gallery, inputs=[gr_sdxl_loras], outputs=[gallery, gr_sdxl_loras], js=js)
603
 
 
587
  # queue=False,
588
  # show_progress=False
589
  #)
590
+ prompt.submit(
591
+ fn=check_selected,
592
+ inputs=[selected_state, custom_loaded_lora],
593
+ show_progress=False
594
+ ).success(
595
+ fn=run_lora,
596
+ inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, aspect_ratio, gr_sdxl_loras, custom_loaded_lora],
597
+ outputs=[result, share_group],
598
+ )
599
+ button.click(
600
  fn=check_selected,
601
  inputs=[selected_state, custom_loaded_lora],
602
  show_progress=False
 
605
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, aspect_ratio, gr_sdxl_loras, custom_loaded_lora],
606
  outputs=[result, share_group],
607
  )
 
608
  share_button.click(None, [], [], js=share_js)
609
  demo.load(fn=classify_gallery, inputs=[gr_sdxl_loras], outputs=[gallery, gr_sdxl_loras], js=js)
610