not-lain commited on
Commit
6c5427b
·
1 Parent(s): e406805

convert mask to grayscale in inpaint function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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