Nodes/Basix Image Filters/Saturate (HSL)
ComfyUI Node

Saturate (HSL)

When the model insists on a muted, washed-out palette

By maludwig·Created 2 years ago·Updated about a year ago· 6
Saturate (HSL)
  • image
  • mask_opt
  • image
masked_areatrue
factor0.5

Some prompts just come out desaturated. The model gives you a lush green Hobbiton that looks like it was shot through a gray filter, and the art style it picked is doing you no favors. Saturate (HSL) is the blunt instrument for that: it adds saturation, directly, to an image, and it's one of the simplest nodes in maludwig's Basix Image Filters pack. Image in, image out, no models, no fuss.

How it works

The node converts your image from RGB into HSL color space, adds the factor value straight onto the saturation channel, clamps to the valid range, and converts back to RGB. That's the entire mechanism - it doesn't touch hue or lightness, so colors get richer without shifting in tone or getting brighter. Because it operates on HSL saturation, a pure gray pixel has zero saturation to add to; this node boosts what color is already there, it can't invent hue where there is none. If your image is genuinely grayscale, you'll want to add color some other way first.

The inputs that matter

The usual pack layout, three inputs:

  • image - any IMAGE tensor from Load Image, VAE Decode, or anywhere else.
  • factor (default 0.5, range −1 to 1) - the amount added to saturation. 0 is no change. 0.5 gives a clear, punchy color boost. 1 maxes out saturation on everything. Negative values desaturate, so the node doubles as a Desaturate if you push it below zero.
  • masked_area + optional mask_opt - the pack's standard masking.

Output is a single image tensor, same dimensions as the input.

What to know before you drag it in

The in-UI description is stale and, again, inverted: it claims a factor of 0 is fully desaturated and 1 is the original. The shipped code does saturation += factor, so 0 is the original and higher is more saturated. Small pack, small node, cheap to verify - drag the slider and watch.

Also worth knowing: the HSV variant of this node runs the identical math. The author says so himself in the README ("honestly I think this might be the exact same thing"). Pick the one whose name you like; on saturation they're the same operation.

Installing it

ComfyUI Manager, search "Basix Image Filters" (repo basix_image_filters), install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/maludwig/basix_image_filters

Restart, done. Zero heavy dependencies, zero downloads - it's plain torch tensor math, which is the whole charm of this pack.

Using it well

Saturation is the classic "run it through img2img" hint: crank the color on a reference image, send it back through the sampler at 0.7–0.9 denoise, and the model tends to reproduce the punchier palette instead of regressing to its gray default. If only part of the image should pop - say, the grass but not the sky - use mask_opt with a MaskEditor mask (right-click a Preview Image node → Copy (Clipspace) → paste into a Load Image node → Open in MaskEditor) and flip masked_area to pick which side of the mask gets saturated. That's the whole workflow, and it's exactly what this pack is good at.

CategoryImage Filters

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
masked_areaBOOLEANtrue
factorFLOAT0.5-1–1
mask_optoptMASK

Outputs (1)

NameTypeDescription
imageIMAGE