From b3b5ddb07a23b3d070df292c7a7fd6f83dc8fd50 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 8 Jan 2024 17:08:17 -0500 Subject: [PATCH] Support I mode images in LoadImageMask. --- nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes.py b/nodes.py index 1ea0669b..96d9e51a 100644 --- a/nodes.py +++ b/nodes.py @@ -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()