Nodes/RC Image Compositor/RC Shine/Oil Removal
ComfyUI Node

RC Shine/Oil Removal

Killing the oil-slick forehead without killing the portrait

By kj863257·Created 11 months ago·Updated 10 months ago· 16
RC Shine/Oil Removal
  • image
  • protection_mask
  • image
  • shine_mask
shine_detection_threshold0.55
shine_removal_strength0.80
high_frequency_reduction0.70
low_frequency_smoothing0.80
saturation_boost1.5
brightness_reduction0.10
smoothing_radius12.0
feather_edges15
skin_tone_detectionfalse
invert_masktrue
protection_strength1.00

Every portrait shooter has a horror story about a subject's forehead catching the light like a freshly waxed car. In photography you fix it with a powder puff; in ComfyUI, you reach for RC Shine/Oil Removal. This is a specialized retouching node built on the same frequency-separation foundation as the pack's skin smoothing, but pointed at one specific problem: specular shine on skin - foreheads, noses, chins - where the reflection blows out texture and washes out color.

The reason this is worth a dedicated node rather than a generic blur is that shine isn't just bright; it's also textured (the glare kills the detail) and desaturated (the highlight wipes out the local color). Fix it with a plain soft brush and you get a gray smudge. This node handles all three problems and hands you the mask it used.

How it works

The pipeline is: detect the shine areas (brightness above a threshold), soften them by reducing high-frequency detail and smoothing the low-frequency layer, then boost saturation back into the affected regions so they don't come out flat. It's frequency separation with a target - the same split-the-image trick, but applied selectively where the highlights are.

Key controls:

  • shine_detection_threshold - brightness threshold for what counts as shine. Default 0.55; the tooltip suggests 0.5–0.6 for portraits. Lower = more sensitive.
  • shine_removal_strength - overall effect strength, 0–1.
  • high_frequency_reduction / low_frequency_smoothing - how hard to kill texture glare vs. smooth tone in the shine areas.
  • saturation_boost - restores the color the highlight washed out. Default 1.5; the 1.5–2.0 range is the sweet spot.
  • brightness_reduction - dims the shine. 0.1 default is gentle; 0.3+ starts to look sculpted.
  • smoothing_radius / feather_edges - the blur radius and how softly the mask edges blend, so you don't get a hard "I edited this zone" boundary.
  • skin_tone_detection - restrict processing to skin tones. Default off (the tooltip's blunt advice: turn it ON for portraits, OFF if it looks like nothing happened).
  • invert_mask - defaults to true, meaning bright = protect, dark = process. The optional protection_mask input lets you paint your own.
  • protection_strength - how hard the protection mask guards its areas.

Outputs: the processed image and the shine_mask it computed - worth wiring to a preview to see exactly what it thinks is shiny.

How to install it

Part of the RC Image Compositor pack:

cd ComfyUI/custom_nodes
git clone https://github.com/kj863257/ComfyUI_RC_Image_Compositor
cd ComfyUI_RC_Image_Compositor
pip install -r requirements.txt

Restart ComfyUI, or install via ComfyUI Manager (search "RC Image Compositor"). Deps: pillow, numpy, opencv-python.

Common issues

The most common failure is the node "doing nothing" - which almost always means the threshold is too high for your image's highlights, or skin_tone_detection is on and the skin detection is failing on your lighting. The debug move is to preview the shine_mask output: if it's black, nothing was detected and you should lower the threshold; if it's covering the whole face, raise it.

Second, don't stack this with the pack's skin smoothing at full strength. Both work by blurring; run shine removal first, then smooth - and keep the smoothing gentle, or you'll flatten the very texture the shine removal just restored.

And a tip: the saturation_boost exists because desaturated shine is the giveaway of a bad edit. If your result looks "cleaned" but lifeless, push that slider before you touch anything else.

CategoryRC/Filters

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
shine_detection_thresholdFLOAT0.550.1–0.95Brightness threshold for detecting shine areas (lower = more sensitive, try 0.5-0.6 for portraits)
shine_removal_strengthFLOAT0.800–1Overall strength of shine removal effect (0=no effect, 1=maximum removal)
high_frequency_reductionFLOAT0.700–1Reduce high frequency detail in shine areas (removes texture glare)
low_frequency_smoothingFLOAT0.800–1Smooth low frequency layer in shine areas (color/tone correction)
saturation_boostFLOAT1.51–3Restore color saturation lost in shiny areas (1.0=no boost, try 1.5-2.0)
brightness_reductionFLOAT0.100–0.5Reduce brightness in processed areas to diminish highlights (0=no reduction, 0.5=maximum reduction)
smoothing_radiusFLOAT12.01–50Frequency separation blur radius (larger = smoother transition)
feather_edgesFLOAT150–50Feather the shine mask edges for natural blending (in pixels, 0=no feather)
skin_tone_detectionBOOLEANfalseOnly process detected skin tone areas (turn OFF if no effect, ON for portraits only)
invert_maskBOOLEANtrueInvert protection mask (enabled by default: mask bright=protect, mask dark=process)
protection_strengthFLOAT1.000–1Control the protection strength of protection mask (0=no protection, 1=full protection)
protection_maskoptMASKProtection mask: bright areas (1.0) will be protected from processing, dark areas (0.0) will be processed

Outputs (2)

NameTypeDescription
imageIMAGE
shine_maskMASK