Nodes/RES4LYF/Image Channels LAB
ComfyUI Node Runs on cloud

Image Channels LAB

Split an image into luminance and color

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Image Channels LAB
  • RGB
  • L
  • A
  • B
  • RGB
  • L
  • A
  • B

Image Channels LAB converts an image between RGB and the LAB color space, and back. LAB splits an image into a lightness channel (L) and two color channels (A, green–red, and B, blue–yellow). The point of doing that: you can operate on brightness and detail separately from color. It's a staple move in serious retouching and color work, and in RES4LYF it's the front end of detail-transfer and frequency-separation pipelines.

Why bother with LAB instead of just editing RGB? Because in RGB, "brightness" and "color" are tangled across all three channels - sharpen or blur and you shift hue. In LAB, the L channel is pure luminance, so you can push detail and contrast without touching color at all, then recombine. That separation is the whole reason the space exists.

How it works

The node works both directions, which is the clever bit. Feed it an RGB image and it outputs the split L, A, and B channels (each as an image you can view or process). Or feed it separate L, A, and B images and it recombines them into RGB. So a typical flow is: split → do something to one channel (usually L) → feed the pieces back through to rebuild.

The inputs and outputs that matter

Everything here is optional, because the node adapts to which direction you're going:

  • RGB (IMAGE, in) - provide this to split; you'll read the L/A/B outputs.
  • L / A / B (IMAGE, in) - provide these to recombine; you'll read the RGB output.
  • Outputs: RGB, L, A, B (all IMAGE). Use whichever side matches your direction.

In practice: split by wiring RGB in and taking L/A/B out; recombine by wiring L/A/B in and taking RGB out.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

Portable ComfyUI: use the embedded pip. Restart, hard-refresh F5. No downloads.

Common issues & troubleshooting

The A and B channels look gray/weird. That's expected - the color channels visualize as low-contrast maps, not pretty pictures. You're not meant to look at them directly; they're intermediate data for recombining. Judge the result after you rebuild RGB.

Colors shifted after round-tripping. If you split and recombine without changing anything, you should get essentially your original back. A visible shift usually means you processed A or B (even slightly) or mismatched which output went where. Double-check L→L, A→A, B→B on the rebuild.

I only want to edit detail, not color. Then operate on L alone and pass A and B through untouched. That's the canonical use: sharpen, blur, or frequency-separate the luminance, leave color alone, recombine.

Pairs with the pack's other image nodes. This is the color-space front end for Frequency Separation Hard Light LAB and Image Median Blur. If you're building detail transfer or skin retouching, those three travel together.

CategoryRES4LYF/images

Inputs (4)

NameTypeDefaultDescription
RGBoptIMAGE
LoptIMAGE
AoptIMAGE
BoptIMAGE

Outputs (4)

NameTypeDescription
RGBIMAGE
LIMAGE
AIMAGE
BIMAGE