Nodes/Allor Plugin/ImageFilterBilateralBlur
ComfyUI Node

ImageFilterBilateralBlur

Bilateral filter for portraits

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageFilterBilateralBlur
  • images
  • IMAGE
size10
sigma_color1.00
sigma_intensity1.00

A Gaussian blur smooths everything, including the edges you were trying to keep. The bilateral filter is the smarter cousin: it blurs flat areas but leaves strong edges alone, which is exactly what you want for skin smoothing that doesn't turn a face into a wax sculpture. ImageFilterBilateralBlur from the Allor plugin is a faithful OpenCV bilateral filter wrapped up as a node - if this is the effect you need, it's the one in this pack you'll actually reach for.

How it works

It's cv2.bilateralFilter under the hood: for each pixel, it averages the neighbors like a blur, but weights them by both spatial distance and how different their color is from the center pixel. Big color difference = low weight, so a sharp edge between a face and a background barely gets touched while the smooth cheek gets smeared into that buttery look.

The node's two sigma inputs are 0–1 sliders that map onto OpenCV's sigma values:

  • sigma_color - how much color difference matters before a pixel is treated as an "edge." Lower values preserve more edges (stronger edge protection); higher values let the blur cross color boundaries more readily.
  • sigma_intensity - the overall blur strength in the flat regions.

size (odd numbers, default 10) sets the kernel diameter - how wide a neighborhood each pixel looks at.

Output is a single IMAGE. It runs per-image on the CPU via the pack's OpenCV helper, so it's not GPU-accelerated but is fine for single images.

Inputs that matter

  • images - the IMAGE or batch.
  • size - kernel size; bigger = smoother, slower.
  • sigma_color / sigma_intensity - the two sliders above. Leave sigma_color near its default and adjust sigma_intensity first.

Installing it

Part of the Allor pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor

Restart ComfyUI, or install via ComfyUI Manager → Allor Plugin. First launch installs rembg + onnx and writes config.json; no model downloads.

Gotchas

  • Bilateral filtering is one of the slower blurs - a large size on a high-res portrait takes noticeable time. Skin-smoothing at 1024 is fine; don't crank size on a 4K batch.
  • The default sigma_color of 1.0 maps to a minimal color sigma, meaning aggressive edge preservation. If your result looks like nothing happened, that's why - raise sigma_color toward 0.9–0.5 territory to let more smoothing through. (Yes, lower number = more smoothing here; the mapping is inverted from what you'd guess.)
  • It leaves the alpha channel handled separately, so transparent inputs survive.
  • Pack-wide update gotcha: rebased repo history can break git pull on old clones; re-clone if it errors.

For a simpler, faster soften with no edge logic, ImageFilterBoxBlur or ImageFilterGaussianBlur are right next to it in the menu.

Categoryimage/filter

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
sizeINT10
sigma_colorFLOAT1.00
sigma_intensityFLOAT1.00

Outputs (1)

NameTypeDescription
IMAGEIMAGE