Spaces:
Running
Running
ciover2024
commited on
Update app.py
Browse files
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 |
-
|
|
|
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
|