From 9d1c610b8975b13ff3b311d5db7b06a583f14cd9 Mon Sep 17 00:00:00 2001 From: flyingshutter Date: Thu, 6 Apr 2023 19:02:28 +0200 Subject: [PATCH] make LoadImagesMask work with non RGBA images --- nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes.py b/nodes.py index 187d54a1..d33760df 100644 --- a/nodes.py +++ b/nodes.py @@ -915,6 +915,8 @@ class LoadImageMask: input_dir = folder_paths.get_input_directory() image_path = os.path.join(input_dir, image) i = Image.open(image_path) + if i.getbands() != ("R", "G", "B", "A"): + i = i.convert("RGBA") mask = None c = channel[0].upper() if c in i.getbands():