From 6a10640f0dd019dd7c74006909f38d0056c317bd Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 8 Jan 2024 03:46:36 -0500 Subject: [PATCH] Support properly loading images with mode I. --- nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes.py b/nodes.py index 82244cf7..1ea0669b 100644 --- a/nodes.py +++ b/nodes.py @@ -1415,6 +1415,8 @@ class LoadImage: output_masks = [] for i in ImageSequence.Iterator(img): i = ImageOps.exif_transpose(i) + if i.mode == 'I': + i = i.point(lambda i: i * (1 / 255)) image = i.convert("RGB") image = np.array(image).astype(np.float32) / 255.0 image = torch.from_numpy(image)[None,]