fix(scripts): get image mask ensure L mode

pull/690/head
Dowon 2024-08-30 20:12:18 +09:00
parent 91f7d8617a
commit 0a1fd3a4af
No known key found for this signature in database
GPG Key ID: 31D3079F422E1444
1 changed files with 1 additions and 0 deletions

View File

@ -658,6 +658,7 @@ class AfterDetailerScript(scripts.Script):
@staticmethod
def get_image_mask(p) -> Image.Image:
mask = p.image_mask
mask = ensure_pil_image(mask, "L")
if getattr(p, "inpainting_mask_invert", False):
mask = ImageChops.invert(mask)
mask = create_binary_mask(mask)