convert mask to grayscale in inpaint function
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def inpaint(
|
|
57 |
background, mask = prepare_image_and_mask(
|
58 |
image, padding_top, padding_bottom, padding_left, padding_right
|
59 |
)
|
60 |
-
|
61 |
cnet_image = background.copy()
|
62 |
cnet_image.paste(0, (0, 0), mask)
|
63 |
|
|
|
57 |
background, mask = prepare_image_and_mask(
|
58 |
image, padding_top, padding_bottom, padding_left, padding_right
|
59 |
)
|
60 |
+
mask = mask.convert("L")
|
61 |
cnet_image = background.copy()
|
62 |
cnet_image.paste(0, (0, 0), mask)
|
63 |
|