Channel Operations
The fastest way to fake a map you don't have
- image
- IMAGE
Channel Operations is the node you reach for when a texture pipeline wants a map you don't have. Need a quick height map? Take the red channel, set blue and green to zero, done. Need an inverted mask? Invert one channel instead of running a whole Color Invert node. It's per-channel manipulation with zero cleverness - and that's exactly why it's handy.
How it works
You pick an operation per channel (red, green, blue) and the node applies it. The options:
- Passthrough - leave the channel alone.
- Normalize (0-1) - stretch that channel to use the full 0–1 range (auto-levels, per channel).
- Invert -
1 - value, flips black↔white. - Set to 0 / 0.5 / 1 - force the channel to a fixed value.
Everything runs in tensor math, so batches are fine and it's effectively free. Output is a single IMAGE with the same size and format as the input.
The inputs that matter
Only required inputs, all enums:
image- whatever you're processing.red_channel,green_channel,blue_channel- each defaults to Passthrough, so a common pattern is "set two to 0, leave one" to isolate a single channel.
What people actually use it for
In the game-texture context this pack lives in, the classic moves are:
- Channel extraction - set two channels to 0 and you've pulled a single channel out as a grayscale map (roughness from a packed map, for example).
- Stamping a map you don't have - a uniform-value channel can stand in for a flat roughness or a neutral mask.
- Per-channel normalize - when one channel is crushed into a small value range, stretching just that channel often beats global level adjustments.
Install
It ships in ComfyUI-Leputen-Utils:
cd ComfyUI/custom_nodes
git clone https://github.com/lilquail/ComfyUI-Leputen-Utils
Restart ComfyUI and the node appears under Leputen-Utils → Image. The pack's deps (scipy, opencv-python, onnxruntime, imageio) install automatically on first launch.
Gotchas
- Normalize is per-channel, not per-image. If you normalize R, G, and B independently on a color image, you'll shift the hue - fine for masks and maps, surprising for albedo. Set two channels to Normalize on a color image and you get a color cast you didn't ask for.
- This doesn't touch alpha. The node only has R/G/B inputs. If you need to operate on the alpha channel you'll want a dedicated mask/matte node.
That's it. It's a small utility, not a hero node - but in a batch pipeline churning out PBR sets, "isolate this channel, stamp that one" saves a surprising amount of graph clutter.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The input image to process. | |
| red_channel | COMBO | Passthrough | Operation to apply to the Red channel. |
| green_channel | COMBO | Passthrough | Operation to apply to the Green channel. |
| blue_channel | COMBO | Passthrough | Operation to apply to the Blue channel. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |