ImageFilterBilateralBlur
Bilateral filter for portraits
- images
- IMAGE
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. Leavesigma_colornear its default and adjustsigma_intensityfirst.
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
sizeon a high-res portrait takes noticeable time. Skin-smoothing at 1024 is fine; don't cranksizeon a 4K batch. - The default
sigma_colorof 1.0 maps to a minimal color sigma, meaning aggressive edge preservation. If your result looks like nothing happened, that's why - raisesigma_colortoward 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 pullon 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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| size | INT | 10 | — |
| sigma_color | FLOAT | 1.00 | — |
| sigma_intensity | FLOAT | 1.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |