ComfyUI Node
BD Channel Merge
Blend/composite a source image into one or more specific RGBA channels of a base image, using Photoshop-style blend modes. Key feature: enable use_source_alpha to use the source image's own alpha as a soft mask — transparent areas of the source leave the base channel unchanged, so you can paste a character (with alpha background) onto a single channel without the background affecting it. Chain multiple BD_ChannelMerge nodes to build up a texture pack progressively, modifying one channel at a time as the image flows through the workflow.
BD Channel Merge
- base
- source
- mask
- image
◄target_channelsR►
◄source_fromluma_bt709►
◄blend_modereplace►
◄strength1.00►
◄use_source_alphatrue►
◄invert_alpha_maskfalse►
◄luma_standardbt709►
Category🧠BrainDead/Segmentation
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| base | IMAGE | Existing image to modify. Can be RGB or RGBA — the channels you don't target pass through unchanged. | |
| source | IMAGE | Image to merge from. Resized to match base dimensions automatically. | |
| target_channels | COMBO | R | Which channel(s) of base to write to. Single: R, G, B, A — source is collapsed to a scalar (see source_from). Multi: RG, RB, GB, RGB, RGBA — source RGB channels map 1:1 to targets. |
| source_from | COMBO | luma_bt709 | For single-channel targets: how to collapse source to a scalar. luma_bt709 = perceptual greyscale (matches skin shader). channel_R/G/B/A = pick one channel directly. average = (R+G+B)/3. max_rgb = brightest channel. Ignored for multi-channel targets (RGB/RGBA) — source channels map directly. |
| blend_mode | COMBO | replace | How blended source value combines with existing base channel value. replace = overwrite. add = brighten. multiply = darken proportionally. screen = brighten (black=no change). overlay = contrast split at 0.5. darken/lighten = min/max. subtract = darken clipped. difference = absolute gap. soft_light = gentle contrast. |
| strength | FLOAT | 1.000–1 | Overall blend opacity. 0 = base unchanged; 1 = full blend applied. Combined multiplicatively with use_source_alpha mask and external mask. |
| use_source_alpha | BOOLEAN | true | Use source image's alpha channel as a soft blend mask. Transparent source pixels (alpha=0) leave base unchanged; opaque pixels (alpha=1) apply the blend at full strength. This lets you composite a character against a transparent background without the BG affecting the target channel. No effect if source has no alpha (RGB only source). |
| invert_alpha_maskopt | BOOLEAN | false | Invert the source alpha mask before using it. Blend applies where source IS transparent instead of opaque. |
| maskopt | MASK | Additional external blend mask. Combined with source alpha and strength. White = full blend, black = base unchanged. | |
| luma_standardopt | COMBO | bt709 | Luma weighting used when source_from=luma_bt709 (or any luma path). 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 (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Modified base image. Same resolution as base. Will be RGBA if base was RGBA or if target_channels includes A; otherwise matches base channel count. |