Nodes/ComfyUI Layer Style/LayerUtility: ImageCombineAlpha
ComfyUI Node Runs on cloud

LayerUtility: ImageCombineAlpha

Image Combine Alpha (Layer Style)

By chflame163·Created 3 years ago·Updated 8 days ago· 3,118
LayerUtility: ImageCombineAlpha
  • RGB_image
  • mask
  • RGBA_image

Image Combine Alpha is the node that turns "an image plus a mask" into "an image with transparency." It glues an RGB picture together with a mask and outputs a proper RGBA image, where the mask becomes the alpha channel. This is the last step of nearly every cutout workflow: you removed a background and got back a picture and a separate mask, and now you want a single transparent PNG you can drop into anything. That merge is what this does.

The mechanism is exactly as literal as it sounds. ComfyUI keeps images (RGB) and masks (a single grayscale channel) as separate things on the wire. This node stacks the mask onto the image as the fourth channel, so where the mask is white the result is opaque and where it's black the result is transparent. No model, no guessing - it's a channel merge.

Two inputs, both required, both obvious:

  • RGB_image - the color image (your subject, your render, whatever).
  • mask - the transparency map. White = keep/opaque, black = cut/transparent.

One output, RGBA_image, the combined image carrying its new alpha channel. Send it to a Save Image node and you get a PNG with real transparency, or feed it straight into a composite node to layer it over a background.

The standard chain is: background remover → this node → save (or composite). A node like RemBg Ultra gives you the subject image and a mask; Image Combine Alpha welds them into the transparent cutout you actually wanted. It's also how you re-attach a mask you built or edited separately - cut a mask by hand, refine it, then combine it back onto the image here.

Two things to get right. First, mask polarity: if your subject comes out transparent and the background opaque, your mask is inverted relative to what this expects (white should be the part you keep). Invert the mask upstream and you're done. Second, alignment - the image and mask must be the same dimensions and actually correspond to each other; a mask from a different-sized image will produce garbage edges. Keep them paired through any resize step.

Installation is via the ComfyUI Layer Style pack. ComfyUI Manager: search "ComfyUI Layer Style," install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt in your ComfyUI environment and restart. No model to download.

Troubleshooting is mostly pack-level: Layer Style is a large, dependency-heavy pack, and its most common failure is the whole thing showing "import failed" in the Manager (a transformers version conflict, usually), which pulls every node - Image Combine Alpha included - from your menu at once. If it's missing, the pack didn't import: reinstall it, use "Try Fix," and reinstall the requirements into ComfyUI's real Python env if it persists. Node-specifically, remember the output only looks transparent when something respects the alpha channel - save it as PNG (not JPG, which has no alpha) or composite it, and it'll behave.

Category😺dzNodes/LayerUtility

Inputs (2)

NameTypeDefaultDescription
RGB_imageIMAGE—
maskMASK—

Outputs (1)

NameTypeDescription
RGBA_imageIMAGE—