1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 15:39:54 +08:00

Merge branch 'fix-LoadImageMask' of https://github.com/flyingshutter/ComfyUI

This commit is contained in:
comfyanonymous
2023-04-12 01:24:53 -04:00

View File

@@ -940,6 +940,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():