1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Change channel type to MASK (reduced redundancy, increased usability)

This commit is contained in:
MoonRide303
2023-09-23 08:34:54 +02:00
parent d06cd2805d
commit ece69bf28c
3 changed files with 8 additions and 50 deletions

View File

@@ -114,7 +114,7 @@ class ImageToMask:
return {
"required": {
"image": ("IMAGE",),
"channel": (["red", "green", "blue"],),
"channel": (["red", "green", "blue", "alpha"],),
}
}
@@ -124,7 +124,7 @@ class ImageToMask:
FUNCTION = "image_to_mask"
def image_to_mask(self, image, channel):
channels = ["red", "green", "blue"]
channels = ["red", "green", "blue", "alpha"]
mask = image[:, :, :, channels.index(channel)]
return (mask,)