Nodes/ComfyUI-BrainDead/BD Pack Channels
ComfyUI Node

BD Pack Channels

Combine up to 4 source images/masks into the RGBA channels of one output. Each channel slot accepts an IMAGE (auto-converted to luminance grayscale) or a MASK. When BOTH are wired the mask masks the image (image × mask). When neither is wired, the channel is filled with the channel's default_value. Toggle output_alpha to get a 4-channel RGBA image; default is RGB only.

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD Pack Channels
  • red_image
  • red_mask
  • green_image
  • green_mask
  • blue_image
  • blue_mask
  • alpha_image
  • alpha_mask
  • image
  • alpha
  • debug_preview
red_default0.00
red_invertfalse
green_default0.00
green_invertfalse
blue_default0.00
blue_invertfalse
output_alphafalse
alpha_default1.00
alpha_invertfalse
width_override0
height_override0
luma_standardbt709
Category🧠BrainDead/Segmentation

Inputs (20)

NameTypeDefaultDescription
red_imageoptIMAGEIMAGE source for the RED channel — its grayscale luminance becomes R.
red_maskoptMASKMASK for the RED channel. If red_image is also wired, this MASKS it (image × mask); alone, the mask IS the channel.
red_defaultoptFLOAT0.000–1Value to fill RED with when neither red_image nor red_mask is wired.
red_invertoptBOOLEANfalseInvert the resolved RED channel before packing.
green_imageoptIMAGEIMAGE source for the GREEN channel — grayscale becomes G.
green_maskoptMASK
green_defaultoptFLOAT0.000–1
green_invertoptBOOLEANfalse
blue_imageoptIMAGEIMAGE source for the BLUE channel — grayscale becomes B.
blue_maskoptMASK
blue_defaultoptFLOAT0.000–1
blue_invertoptBOOLEANfalse
output_alphaoptBOOLEANfalseIf True, output is 4-channel RGBA instead of RGB. Use the alpha_image/alpha_mask/alpha_default inputs to set the A channel.
alpha_imageoptIMAGEIMAGE source for the ALPHA channel. If RGBA, the alpha channel is used directly. If RGB, luminance is computed. Wiring this auto-enables output_alpha.
alpha_maskoptMASKMASK source for the ALPHA channel (wins over alpha_image). Wiring this auto-enables output_alpha.
alpha_defaultoptFLOAT1.000–1Value to fill ALPHA with when no alpha source is wired (default 1.0 = opaque).
alpha_invertoptBOOLEANfalse
width_overrideoptINT00–8192Override output width. 0 = use first non-None source's width.
height_overrideoptINT00–8192Override output height. 0 = use first non-None source's height. All channels are resized to this dimension.
luma_standardoptCOMBObt709When an IMAGE input is provided (not MASK), luminance is computed using this weighting. RGB → luminance weighting: bt709 (default): 0.2126 R + 0.7152 G + 0.0722 B — modern sRGB/Rec.709 standard. Use for Unity/Unreal, AI pipelines, modern display work. bt601: 0.299 R + 0.587 G + 0.114 B — legacy NTSC weights, matches Photoshop 'Desaturate' and older tools. average: (R+G+B)/3 — simple, not perceptual.

Outputs (3)

NameTypeDescription
imageIMAGE
alphaMASK
debug_previewIMAGE2x2 grid showing each channel as greyscale. Top-left=R, top-right=G, bottom-left=B, bottom-right=A. Each quadrant has a small colored corner tag (red/green/blue/white) to identify the channel.