mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
make LoadImagesMask work with non RGBA images
This commit is contained in:
parent
0bb5f93b92
commit
9d1c610b89
2
nodes.py
2
nodes.py
@ -915,6 +915,8 @@ class LoadImageMask:
|
|||||||
input_dir = folder_paths.get_input_directory()
|
input_dir = folder_paths.get_input_directory()
|
||||||
image_path = os.path.join(input_dir, image)
|
image_path = os.path.join(input_dir, image)
|
||||||
i = Image.open(image_path)
|
i = Image.open(image_path)
|
||||||
|
if i.getbands() != ("R", "G", "B", "A"):
|
||||||
|
i = i.convert("RGBA")
|
||||||
mask = None
|
mask = None
|
||||||
c = channel[0].upper()
|
c = channel[0].upper()
|
||||||
if c in i.getbands():
|
if c in i.getbands():
|
||||||
|
Loading…
Reference in New Issue
Block a user