1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Support I mode images in LoadImageMask.

This commit is contained in:
comfyanonymous
2024-01-08 17:08:17 -05:00
parent 2d74fc4360
commit b3b5ddb07a

View File

@@ -1472,6 +1472,8 @@ class LoadImageMask:
i = Image.open(image_path)
i = ImageOps.exif_transpose(i)
if i.getbands() != ("R", "G", "B", "A"):
if i.mode == 'I':
i = i.point(lambda i: i * (1 / 255))
i = i.convert("RGBA")
mask = None
c = channel[0].upper()