Ashoka74 commited on
Commit
b88786a
1 Parent(s): e759dfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -614,9 +614,9 @@ def process_bg(input_fg, input_bg, prompt, image_width, image_height, num_sample
614
 
615
  @torch.inference_mode()
616
  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):
617
- input_fg, matting = run_rmbg(input_fg)
618
  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)
619
- return input_fg, results
620
 
621
 
622
 
@@ -1142,7 +1142,7 @@ with block:
1142
  # run_on_click=True, examples_per_page=1024
1143
  # )
1144
  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]
1145
- relight_button.click(fn=process_relight, inputs=ips, outputs=[extracted_fg, result_gallery])
1146
  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)
1147
  example_quick_subjects.click(lambda x: x[0], inputs=example_quick_subjects, outputs=prompt, show_progress=False, queue=False)
1148
  find_objects_button.click(
 
614
 
615
  @torch.inference_mode()
616
  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):
617
+ #input_fg, matting = run_rmbg(input_fg)
618
  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)
619
+ return results
620
 
621
 
622
 
 
1142
  # run_on_click=True, examples_per_page=1024
1143
  # )
1144
  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]
1145
+ relight_button.click(fn=process_relight, inputs=ips, outputs=[result_gallery])
1146
  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)
1147
  example_quick_subjects.click(lambda x: x[0], inputs=example_quick_subjects, outputs=prompt, show_progress=False, queue=False)
1148
  find_objects_button.click(