Desaturation
Strip the color per channel — the control that a grayscale slider never gives you
- image
- ui_widget
- image
- image_list
You can get a grayscale version of any image with a single slider almost anywhere. What you usually can't get easily is a desaturation that respects the color channels - pulling the red out of a scene while leaving blues and greens mostly intact, or dialing in a moody partial color-grade. That's the narrow thing LF_Desaturation does, and it's why the node exists in a pack of filters that could've just shipped a grayscale button.
The design is dead simple and unusual at the same time. There's one global_level (0 to 1, default 0.5) controlling the total intensity - 0 is no effect, 1 is fully desaturated. Then three per-channel controls, r_channel, g_channel, b_channel, each 0 to 1, default 1, which set how strongly that channel participates in the desaturation relative to the global strength.
So: keep everything at default and global_level 1 gets you grayscale. Drop r_channel to 0 and bump global_level up, and red stays vivid while the rest of the image washes toward gray - a classic selective-color look, done with three sliders instead of a mask.
How it fits
Standard LF filter behavior: batch in, image and image_list out, KUL_COMPARE before/after widget on the node. The natural pipeline is post-sampler, pre-save - or downstream of LF_LoadImages if you're batch-stylizing a folder. It composes well with the other filters: desaturate partially, then use LF_Brightness to fix the tonal shift, since desaturation usually muddies the perceived brightness of an image.
A quick note on the defaults
r_channel, g_channel, and b_channel all default to 1, meaning "fully participate." To get the selective-color effect, you lower the channel you want to keep. It's a slightly backwards mental model - you're disabling a channel's desaturation, not enabling it - but it clicks fast once you play with the compare widget.
Installing it
Standard LF Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf
or ComfyUI Manager → LF Nodes → install → restart. No dependencies, no models. The pack is the frozen legacy repo (development moved to lf-nodes), so this is stable, finished code.
Where people get burned
- Desaturation always shifts apparent brightness. Grayscale images look dimmer than their color versions to human eyes. If you desaturate and it looks muddy, follow up with a brightness/gamma bump - the pack's
LF_Brightnessis right there. - Channel weights are relative to global strength, not additive to it. Setting
r_channelto 0.5 atglobal_level0.5 gives you half of half, not a predictable "mostly keep red" - again, the compare widget is your friend. - This is per-channel desaturation, not a hue-remap. If you want to shift colors rather than remove them, that's a different tool entirely.
For the selective-color look and any partial desaturation, this is the one knob set to reach for.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image tensor or a list of image tensors. | |
| global_level | FLOAT | 0.500–1 | Controls the total intensity of the desaturation. 0 is no effect, 1 is fully desaturated. |
| r_channel | FLOAT | 1.000–1 | Controls the intensity of the red channel desaturation relative to the total strength of the filter. |
| g_channel | FLOAT | 1.000–1 | Controls the intensity of the green channel desaturation relative to the total strength of the filter. |
| b_channel | FLOAT | 1.000–1 | Controls the intensity of the blue channel desaturation relative to the total strength of the filter. |
| ui_widgetopt | KUL_COMPARE | [object Object] | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_list | IMAGE | — |