Nodes/comfyui_face_parsing/GuidedFilter(FaceParsing)
ComfyUI Node

GuidedFilter(FaceParsing)

The skin-smoothing node, and the one opencv actually cares about

By Ryuukeisyou·Created 3 years ago·Updated about a year ago· 193
GuidedFilter(FaceParsing)
  • image
  • guide
  • IMAGE
radius3
eps125

This is the node the whole "skin enhancer" use case for this pack is built around. A guided filter is an edge-preserving smoothing technique - it blurs flat, low-detail areas (like skin) while leaving sharp edges (like the eyes, lips, or hairline) alone, guided by a reference image that tells it where the real edges are. That's a meaningfully better tool for skin smoothing than a plain Gaussian blur, which blurs everything equally and leaves faces looking waxy or plastic. Pair this with a skin-only mask from FaceParsingResultsParser and you get smoothing that respects the actual boundaries of the face instead of bleeding across them.

How it works

The guided filter algorithm computes a local linear model between a guide image and the input, using two parameters - a window radius and a regularization term - to control how much smoothing happens and how strictly edges are respected. You can run it self-guided (the image smooths itself) or pass a separate guide image, which is the more powerful mode: feed it the original unmasked face as the guide while smoothing a processed version, and edges from the original keep the result from smearing across real facial features.

The inputs that matter

  • image (IMAGE) - required, what you're smoothing.
  • radius (INT, default 3, min 0) - the filter window size. Bigger radius means smoothing considers a wider neighborhood, which generally means more aggressive smoothing. Start small; 3 is already a reasonable default for skin work.
  • eps (FLOAT, default 125, min 0) - the regularization term. This is the knob that actually controls how much edge preservation you get: lower eps preserves edges more strictly (closer to "only blur truly flat regions"), higher eps smooths more broadly and starts to blur across weaker edges too.
  • guide (IMAGE, optional, default null) - an optional separate guide image. Leave it empty and the filter guides itself off the input image; supply one and edges come from the guide instead. In a typical skin-smoothing chain, this is where you'd feed the original, unprocessed crop.

The output is a single IMAGE, the filtered result - typically composited with your mask (from FaceParsingResultsParser) back onto the original rather than used as a full replacement, so only the masked skin region actually gets smoothed.

Installing it

Bundled with the rest of comfyui_face_parsing:

  • ComfyUI Manager - search "comfyui_face_parsing", install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Ryuukeisyou/comfyui_face_parsing.git, restart ComfyUI.

Common issues

This is the one node in the pack with a real, documented dependency gotcha: the guided filter needs opencv-contrib-python specifically, not the plain opencv-python or opencv-python-headless that most other custom nodes install. The README calls this out directly - if you already have a different opencv variant installed (which is extremely common, since half the face/detection nodes in this ecosystem pull in their own opencv), the contrib package can lose the fight for import priority. The fix, straight from the README: uninstall whatever opencv variant you have, then reinstall opencv-contrib-python fresh so it's the one Python actually resolves. If you genuinely don't need this node, you can skip worrying about opencv-contrib-python entirely - it's specifically the guided filter's dependency, not something the rest of the pack needs.

If GuidedFilter is installed and importing fine but results look wrong - either barely smoothed or smearing across the eyes and lips - that's almost always eps set too high for the amount of detail you want preserved; dial it down before touching radius.

Categoryface_parsing

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
radiusINT3
epsFLOAT125
guideoptIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE