RC Shine/Oil Removal
Killing the oil-slick forehead without killing the portrait
- image
- protection_mask
- image
- shine_mask
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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| shine_detection_threshold | FLOAT | 0.550.1–0.95 | Brightness threshold for detecting shine areas (lower = more sensitive, try 0.5-0.6 for portraits) |
| shine_removal_strength | FLOAT | 0.800–1 | Overall strength of shine removal effect (0=no effect, 1=maximum removal) |
| high_frequency_reduction | FLOAT | 0.700–1 | Reduce high frequency detail in shine areas (removes texture glare) |
| low_frequency_smoothing | FLOAT | 0.800–1 | Smooth low frequency layer in shine areas (color/tone correction) |
| saturation_boost | FLOAT | 1.51–3 | Restore color saturation lost in shiny areas (1.0=no boost, try 1.5-2.0) |
| brightness_reduction | FLOAT | 0.100–0.5 | Reduce brightness in processed areas to diminish highlights (0=no reduction, 0.5=maximum reduction) |
| smoothing_radius | FLOAT | 12.01–50 | Frequency separation blur radius (larger = smoother transition) |
| feather_edges | FLOAT | 150–50 | Feather the shine mask edges for natural blending (in pixels, 0=no feather) |
| skin_tone_detection | BOOLEAN | false | Only process detected skin tone areas (turn OFF if no effect, ON for portraits only) |
| invert_mask | BOOLEAN | true | Invert protection mask (enabled by default: mask bright=protect, mask dark=process) |
| protection_strength | FLOAT | 1.000–1 | Control the protection strength of protection mask (0=no protection, 1=full protection) |
| protection_maskopt | MASK | Protection mask: bright areas (1.0) will be protected from processing, dark areas (0.0) will be processed |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| shine_mask | MASK | — |