Image Apply Channel
Write a mask into an image's R/G/B/A channel
- images
- channel_data
- IMAGE
This is ImageExtractChannel running backward. That node pulls one channel - usually alpha - out of an image and hands it back as a MASK. This one writes a mask back into a channel of an image. The most common reason to do that: you ran a background remover and have a clean mask, but you want it baked into the image's actual alpha channel so the file round-trips as a proper transparent PNG, instead of carrying the transparency as a separate wire that only your current graph understands.
How it works
Take an image and a mask, pick which channel to write into, and the node replaces that channel's data in the output image with the mask's values - everywhere else in the image stays untouched. Write to A and you get an RGBA image with the mask as real transparency. Write to R, G, or B and you're overwriting that specific color channel instead, which is a less common move but useful for building or repairing a data-encoded image (a depth pass, a custom map) one channel at a time.
The inputs and outputs that matter
Three required inputs:
images- theIMAGEto modify.channel_data- theMASKto write in. Typically the output ofISNetSegment, a hand-painted mask, orImageExtractChannelpulled from somewhere else.channel- which channel to overwrite:R,G,B, orA.Ais the common pick for baking in transparency.
One output: IMAGE, with the chosen channel replaced.
How to install it
Comes with the Art Venture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
Restart ComfyUI. No model downloads - pixel manipulation only.
Common issues & troubleshooting
Saved the result and it's still opaque. Writing to the A channel here only produces an image with real alpha data - whether that transparency survives depends on your save node and file format. Save as PNG (which supports alpha) rather than JPEG (which doesn't), and make sure your save node isn't set to flatten the image.
Wrote to A but the image looks unchanged in a normal viewer. Many image viewers and thumbnail generators don't render transparency by default, or show it as a checkerboard only in specific apps. Load it into an editor that respects alpha, or composite it over a background with ImageAlphaComposite to see the effect directly.
Overwrote the wrong channel by mistake. Double-check the channel dropdown - R/G/B overwrite color data, which is destructive to the visible image if that wasn't the intent. A is almost always what you want when the goal is transparency.
The mask doesn't line up with the image. channel_data needs to match images in resolution. If the mask came from a different-sized source (a resize step you forgot, a different generation pass), align dimensions before wiring it in - otherwise you'll get a stretched or misregistered result.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| channel_data | MASK | — | |
| channel | COMBO | 4 options: R, G, B, A |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |