ciover2024 commited on
Commit
d87d4d0
·
verified ·
1 Parent(s): ed6e950

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -115,7 +115,8 @@ def inpaint_image(input_image, mask_image):
115
  IMAGE_SIZE = (1024,1024)
116
  initial_input_image = input_image.resize(IMAGE_SIZE)
117
  initial_mask_image = mask_image.resize(IMAGE_SIZE)
118
- result = inpaint_pipeline(prompt=prompt, image=initial_input_image, mask_image=initial_mask_image, height=IMAGE_SIZE[0], width=IMAGE_SIZE[0])
 
119
  inpainted_image = result.images[0]
120
  #inpainted_image = resize_to_match(input_image, inpainted_image)
121
  return inpainted_image
 
115
  IMAGE_SIZE = (1024,1024)
116
  initial_input_image = input_image.resize(IMAGE_SIZE)
117
  initial_mask_image = mask_image.resize(IMAGE_SIZE)
118
+ blurred_mask_image = inpaint_pipeline.mask_processor.blur(initial_mask_image,blur_factor=50)
119
+ result = inpaint_pipeline(prompt=prompt, image=initial_input_image, mask_image=blurred_mask_image, height=IMAGE_SIZE[0], width=IMAGE_SIZE[0])
120
  inpainted_image = result.images[0]
121
  #inpainted_image = resize_to_match(input_image, inpainted_image)
122
  return inpainted_image