Nodes/ComfyUI-MakkiTools/ImageChannelSeparate(mki-图像通道分离)
ComfyUI Node

ImageChannelSeparate(mki-图像通道分离)

Pull one color channel out of an image

By MakkiShizu·Created about a year ago·Updated 7 months ago· 9
ImageChannelSeparate(mki-图像通道分离)
  • image
  • IMAGE
channelred

ImageChannelSeparate_makki (display name "ImageChannelSeparate(mki-图像通道分离)") does one thing: takes an image and gives you back just the red, green, blue, or alpha channel. In ComfyUI an image is a tensor where the last dimension holds the channels, and this node pulls whichever one you ask for into an image you can actually see and wire on.

What it's actually for

Channel math is a surprisingly common trick in this ecosystem. Extracting the alpha channel is the classic one - if a node upstream produced an image with transparency, pulling the alpha out as a grayscale image is how you get a mask of the transparent regions without any compositing. Extract red and green and you can do channel-swap effects. And because the output is a normal IMAGE, you can run it through blur, threshold, or any other image node - which is how people turn a channel into a usable mask.

How it works

The node zeroes out every channel except the one you selected, so the output isn't a bare grayscale slab - it's a proper image with the chosen channel intact and the rest black. A couple of details worth knowing:

  • It keeps the alpha channel when the source has one and you're extracting R, G, or B. So extracting "red" from an RGBA image gives you the red channel with alpha still attached, which means the output composites correctly instead of becoming a solid block.
  • Asking for alpha on a 3-channel image doesn't crash - there's no alpha to extract, so it just returns the image unchanged. That silent fallback is fine, but it means a missing alpha looks like "nothing happened."

Inputs and output

  • image (required) - the input.
  • channel - red, green, blue, or alpha (default red).
  • Output: IMAGE.

That's the whole schema. Pair it with the pack's MergeImageChannels_makki to round-trip: separate channels out, process them independently (which is the whole point - adjust one channel, leave the others alone), then merge back.

Installing

It's part of ComfyUI-MakkiTools:

cd ComfyUI/custom_nodes
git clone https://github.com/MakkiShizu/ComfyUI-MakkiTools
cd ComfyUI-MakkiTools
pip install -r requirements.txt

Restart ComfyUI. No dependencies beyond what the pack installs - this is pure tensor slicing under the hood.

Honest take: this is a small node that competes with several bigger packs' color-tools (Impact Pack and the WAS suite both have channel utilities). But it's self-contained, it preserves alpha, and if you only need one channel extracted without installing a 50-node pack, it's the tidy option. Reach for it when you want the alpha as a mask or you're doing channel-level edits as part of a larger composite.

CategoryMakkiTools

Inputs (2)

NameTypeDefaultDescription
imageIMAGEInput image 输入图像
channelCOMBOredSelect which channel to extract 选择要提取的通道

Outputs (1)

NameTypeDescription
IMAGEIMAGE