Ashoka74 commited on
Commit
0c43912
Β·
verified Β·
1 Parent(s): 7fbeaaa

Update gradio_demo.py

Browse files
Files changed (1) hide show
  1. gradio_demo.py +2 -2
gradio_demo.py CHANGED
@@ -607,7 +607,7 @@ def process_bg(input_fg, input_bg, prompt, image_width, image_height, num_sample
607
  @spaces.GPU(duration=60)
608
  @torch.inference_mode()
609
  def process_relight(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source):
610
- input_fg, matting = run_rmbg(input_fg)
611
  results = process(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source)
612
  return input_fg, results
613
 
@@ -1027,7 +1027,7 @@ with block:
1027
  # outputs=[result_gallery, output_bg],
1028
  # run_on_click=True, examples_per_page=1024
1029
  # )
1030
- ips = [input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source]
1031
  relight_button.click(fn=process_relight, inputs=ips, outputs=[extracted_fg, result_gallery], show_progress=True)
1032
  example_quick_prompts.click(lambda x, y: ', '.join(y.split(', ')[:2] + [x[0]]), inputs=[example_quick_prompts, prompt], outputs=prompt, show_progress=False, queue=False)
1033
  example_quick_subjects.click(lambda x: x[0], inputs=example_quick_subjects, outputs=prompt, show_progress=False, queue=False)
 
607
  @spaces.GPU(duration=60)
608
  @torch.inference_mode()
609
  def process_relight(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source):
610
+ # input_fg, matting = run_rmbg(input_fg)
611
  results = process(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source)
612
  return input_fg, results
613
 
 
1027
  # outputs=[result_gallery, output_bg],
1028
  # run_on_click=True, examples_per_page=1024
1029
  # )
1030
+ ips = [extracted_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source]
1031
  relight_button.click(fn=process_relight, inputs=ips, outputs=[extracted_fg, result_gallery], show_progress=True)
1032
  example_quick_prompts.click(lambda x, y: ', '.join(y.split(', ')[:2] + [x[0]]), inputs=[example_quick_prompts, prompt], outputs=prompt, show_progress=False, queue=False)
1033
  example_quick_subjects.click(lambda x: x[0], inputs=example_quick_subjects, outputs=prompt, show_progress=False, queue=False)