OriLib commited on
Commit
9a97b4c
1 Parent(s): 0bd9523

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -33,8 +33,8 @@ def generate_(prompt, negative_prompt, control_tensor, num_steps, controlnet_con
33
  image = control_tensor,
34
  generator=generator
35
  ).images[0]
36
- result_image = paste_fg_over_image(gen_img, image, mask)
37
- return result_image
38
 
39
  @spaces.GPU
40
  def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
@@ -43,9 +43,10 @@ def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditio
43
  mask = remove_bg_from_image(image)
44
  control_tensor = get_control_image_tensor(pipe.vae, image, mask)
45
 
46
- images = generate_(prompt, negative_prompt, control_tensor, num_steps, controlnet_conditioning_scale, seed)
 
47
 
48
- return [depth_image, images[0]]
49
 
50
 
51
 
 
33
  image = control_tensor,
34
  generator=generator
35
  ).images[0]
36
+
37
+ return gen_img
38
 
39
  @spaces.GPU
40
  def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
 
43
  mask = remove_bg_from_image(image)
44
  control_tensor = get_control_image_tensor(pipe.vae, image, mask)
45
 
46
+ gen_image = generate_(prompt, negative_prompt, control_tensor, num_steps, controlnet_conditioning_scale, seed)
47
+ result_image = paste_fg_over_image(gen_image, image, mask)
48
 
49
+ return [mask ,result_image]
50
 
51
 
52