abhishek HF staff commited on
Commit
6b79de9
1 Parent(s): d786888
Files changed (2) hide show
  1. __pycache__/app.cpython-38.pyc +0 -0
  2. app.py +9 -2
__pycache__/app.cpython-38.pyc CHANGED
Binary files a/__pycache__/app.cpython-38.pyc and b/__pycache__/app.cpython-38.pyc differ
 
app.py CHANGED
@@ -53,7 +53,7 @@ with gr.Blocks() as demo:
53
  )
54
  selected_pixels = gr.State([])
55
  with gr.Row():
56
- input_img = gr.Image(label="Input", shape=(512, 512))
57
  mask_img = gr.Image(label="Mask", interactive=False)
58
  seg_img = gr.Image(label="Segmentation", interactive=False)
59
  output_img = gr.Image(label="Output", interactive=False)
@@ -108,7 +108,14 @@ with gr.Blocks() as demo:
108
  mask = mask.resize((512, 512))
109
  seg_img = seg_img.resize((512, 512))
110
 
111
- output = pipe(prompt, image, mask, seg_img, negative_prompt=negative_prompt).images[0]
 
 
 
 
 
 
 
112
  torch.cuda.empty_cache()
113
  return output
114
 
 
53
  )
54
  selected_pixels = gr.State([])
55
  with gr.Row():
56
+ input_img = gr.Image(label="Input")
57
  mask_img = gr.Image(label="Mask", interactive=False)
58
  seg_img = gr.Image(label="Segmentation", interactive=False)
59
  output_img = gr.Image(label="Output", interactive=False)
 
108
  mask = mask.resize((512, 512))
109
  seg_img = seg_img.resize((512, 512))
110
 
111
+ output = pipe(
112
+ prompt,
113
+ image,
114
+ mask,
115
+ seg_img,
116
+ negative_prompt=negative_prompt,
117
+ num_inference_steps=20,
118
+ ).images[0]
119
  torch.cuda.empty_cache()
120
  return output
121