Nodes/MKRShift_Nodes/Channel Breakout
ComfyUI Node

Channel Breakout

Split an image into its R, G, B, A, plain and simple

By criskb·Created 7 months ago·Updated 5 months ago· 0
Channel Breakout
  • image
  • red_image
  • green_image
  • blue_image
  • alpha_image
  • red_mask
  • green_mask
  • blue_mask
  • alpha_mask
  • breakout_info
alpha_fallback

This one is exactly what the name says, and that's a feature. x1ChannelBreakout splits an image into its red, green, blue, and alpha channels - each as both a grayscale image and a scalar mask. No heuristics, no settings JSON, no surprises. It's the utility side of MKRShift Nodes' Surface/Tech Art branch, and it's the natural front-end to x1ChannelPack: breakout first if you need to pull specific channels out of a texture, then pack what you want into a new channel layout.

The pack is young and, for the tech-art section, deliberately boring in the good way - deterministic math, no models, no downloads.

How it works

Read the source and it's a direct slice: it takes the image batch, pulls [..., 0], [..., 1], [..., 2] for red, green, blue, and either the alpha channel (when present) or a fallback for it. The alpha_fallback enum handles the case where your image has no alpha - zero (black), one (white), or luma (derive alpha from the luminance, which is handy when you want "opaque where it's bright"). Each channel comes out twice:

  • red_image / green_image / blue_image / alpha_image - grayscale image previews (for viewing and for feeding image inputs elsewhere)
  • red_mask / green_mask / blue_mask / alpha_mask - the same values as scalar masks, which is what downstream nodes that take MASK inputs actually want

Plus breakout_info, a string that reports which alpha source was resolved - genuinely useful when you feed it a mix of images with and without alpha and need to know what you got.

What it's for

The author's list: before channel packing, for mask authoring (take the green channel as a luminance mask), and for technical lookdev debugging - "which channel is carrying my detail" is a question you answer in one node. It also plays well with the scalar-map family: a channel from a texture can be the seed for x1CavityMap or any other derivation in the branch.

Inputs

  • image - the only required input
  • alpha_fallback - zero, one, or luma for images without an alpha channel

Installing

ComfyUI Manager → search MKRShift Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart ComfyUI. No models, no new Python dependencies - a straight numpy slice.

Where people get burned

  • Image vs. mask outputs. If you wire the red_image output into something expecting a MASK, you may get a type error or a silent mismatch; that's why the masks exist as separate outputs. Pick by socket type, not by which output you happened to see first.
  • Alpha fallback is per-image, not per-channel. If your batch mixes RGBA and RGB images, the fallback resolves once for the whole batch, and breakout_info tells you what happened. Check it when results look inconsistent across the batch.

It won't win you any awards, but the day you need "just the blue channel as a mask," this is the node that was built for it.

CategoryMKRShift Nodes/Surface/Tech Art

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
alpha_fallbackCOMBO3 options: zero, one, luma

Outputs (9)

NameTypeDescription
red_imageIMAGE
green_imageIMAGE
blue_imageIMAGE
alpha_imageIMAGE
red_maskMASK
green_maskMASK
blue_maskMASK
alpha_maskMASK
breakout_infoSTRING