ariG23498 HF staff commited on
Commit
f153f53
1 Parent(s): e62a27c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -139,7 +139,7 @@ def run_inpainting(image, replaced_caption, masks, generator, device):
139
  ).to(device)
140
 
141
  masks = Image.fromarray(masks.numpy())
142
- dilation_image = masks.filter(ImageFilter.MaxFilter(3))
143
 
144
  prompt = replaced_caption
145
  negative_prompt = """lowres, bad anatomy, bad hands,
@@ -149,7 +149,8 @@ def run_inpainting(image, replaced_caption, masks, generator, device):
149
  output = pipeline(
150
  prompt=prompt,
151
  image=image,
152
- mask_image=dilation_image,
 
153
  negative_prompt=negative_prompt,
154
  guidance_scale=7.5,
155
  strength=1.0,
 
139
  ).to(device)
140
 
141
  masks = Image.fromarray(masks.numpy())
142
+ # dilation_image = masks.filter(ImageFilter.MaxFilter(3))
143
 
144
  prompt = replaced_caption
145
  negative_prompt = """lowres, bad anatomy, bad hands,
 
149
  output = pipeline(
150
  prompt=prompt,
151
  image=image,
152
+ # mask_image=dilation_image,
153
+ mask_image=masks,
154
  negative_prompt=negative_prompt,
155
  guidance_scale=7.5,
156
  strength=1.0,