Desaturate (HSL)
Dialing the color back when the mood needs to sour
- image
- mask_opt
- image
The README opens its example for this node with a model that only knows the Shire from the movies - so when you ask for the Scouring of the Shire, a book scene that's supposed to feel drained and grim, it hands you lush green Hobbiton. Desaturate (HSL) is the response: it strips saturation out of an image, and it's about as direct a tool as this pack contains. If you want a muted, washed, "the color is leaking out of this scene" look without touching brightness, this is the node.
How it works
Image in, HSL conversion, subtract the factor from the saturation channel, clamp, convert back. Hue and lightness are left alone, so the image keeps its tonal structure - shadows stay shadowy - while the color drains away. A factor of 1 makes everything fully gray. Because it never touches the lightness channel, you get a desaturated image that's still bright where it was bright, which is subtly different from "dark and moody" and often exactly the flat, tired look you're after.
The inputs that matter
Standard pack layout:
image- any IMAGE tensor.factor(default 0.5, range −1 to 1) - the amount subtracted from saturation. 0 is no change; 1 is full grayscale; negative values saturate instead, which is a decent emergency color-boost if that's the direction you need.masked_area+ optionalmask_opt- the pack-wide mask system.
Output is a single image tensor, same size as the input.
The things worth flagging
The in-UI description is inverted again - it claims factor 0 gives full desaturation and factor 1 is the original, but the code does saturation -= factor, so 0 is the original and 1 is gray. If it ever looks wrong, that's the description, not the node.
And no, this isn't different from the HSV Desaturate node in any meaningful way. Both subtract from the saturation channel; the author's README shrugs and admits it. Same math, different label. Pick the one whose sibling you're already using.
Installing it
ComfyUI Manager → search "Basix Image Filters" (repo basix_image_filters) → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/maludwig/basix_image_filters
Restart after. No models to download, no dependencies beyond what ComfyUI already has - this whole pack is pure torch math, so it's one of the least painful installs you'll do.
Putting it to work
The classic move is hinting: desaturate the image, feed it through an img2img pass at 0.7–0.9 denoise, and the model tends to reproduce the drained palette instead of re-vivifying it. For a localized grade - keep the Shire green but make the storm clouds sickly - drop in mask_opt with a MaskEditor mask. You can create that mask with ComfyUI's built-in Clipspace trick (right-click a Preview Image node → Copy (Clipspace), paste into a Load Image node, right-click → Open in MaskEditor), then use the masked_area toggle to desaturate inside the mask, outside it, or - if you want both effects - flip the toggle between runs using the same mask. That last bit is a genuinely clever pack feature: one mask, two regions, zero redrawing.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| masked_area | BOOLEAN | true | — |
| factor | FLOAT | 0.5-1–1 | — |
| mask_optopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |