ComfyUI Node

Smart Sharpening

Unsharp masking that picks its own settings

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
Smart Sharpening
  • image
  • sharpened_image
  • processing_info
sharpening_modeauto_adaptive
custom_radius1.0
custom_amount0.5
overshoot_protectiontrue

Sharpening is one of those operations everyone reaches for and almost nobody tunes properly. Crank a generic unsharp mask too far and you get halos around every edge; too little and it does nothing. This node's pitch is that it looks at the image first and picks a reasonable radius and amount for you, with manual override available when you actually know better than the auto-adaptive mode.

How it works

Under the hood this is unsharp masking, the same technique that's been standard in image editors for decades: blur a copy of the image, subtract that blur from the original to isolate an "edge" layer, then add that edge layer back in at some strength. The two classic parameters are radius (how wide the blur is, which controls what counts as an "edge" versus texture) and amount (how much of that edge layer gets added back). What makes this node "smart" is that in auto_adaptive mode it doesn't make you pick those - it derives them from the image itself, presumably its own read of edge density and existing noise level, and overshoot_protection clamps the result so edges don't blow out into visible white/black halos, which is the single most recognizable sharpening artifact.

The inputs and outputs that matter

  • image - required.
  • sharpening_mode - auto_adaptive (default, lets the node pick), conservative (gentle, safe default if you're unsure), aggressive (strong, more halo risk), or custom (you set the numbers yourself).
  • custom_radius (optional, 0.1–5, default 1) - only used in custom mode. Fine detail sharpening around 0.5, broad sharpening up toward 2.0.
  • custom_amount (optional, 0.1–2, default 0.5) - also custom-only. Subtle around 0.3, strong up near 1.0.
  • overshoot_protection (optional, default true) - leave this on unless you specifically want maximum sharpening and are willing to accept halo artifacts around high-contrast edges.
  • Outputs: sharpened_image, and processing_info describing what settings actually ran - genuinely useful if you're using auto_adaptive and want to know what it decided.

How to install it

Search Eric_Image_Processing_Nodes in ComfyUI Manager, or manually:

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

Restart ComfyUI. Sharpening is a classical filter operation, not a pretrained model - so there's nothing to download, and this node is ready the moment the pack imports. It only needs the core requirements (numpy, opencv-python, scikit-image, scipy, PyWavelets).

Common issues & troubleshooting

Visible halos around edges. That's overshoot - either you're in aggressive mode, you cranked custom_amount too high, or you turned overshoot_protection off. Turn protection back on first; it's specifically there to catch this.

No visible effect at all. You're probably in conservative mode on an image that needed more, or custom_amount is set too low. Try auto_adaptive first - it's meant to be the reasonable default - before assuming the node isn't doing anything.

Sharpening amplifies noise instead of detail. This is the fundamental limitation of unsharp masking on any noisy source - it can't tell the difference between a real edge and a noise speckle, it sharpens both. Denoise first (this pack has several options - SCUNet, BM3D, wavelet denoising) and sharpen after, not the other way around.

custom_radius/custom_amount do nothing. They're only read when sharpening_mode is set to custom - in any other mode the node ignores them by design.

CategoryEric's Nodes/Advanced Enhancement

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
sharpening_modeCOMBOauto_adaptiveSharpening mode: • auto_adaptive: Automatic parameter selection • conservative: Gentle sharpening • aggressive: Strong sharpening • custom: Manual parameters
custom_radiusoptFLOAT1.00.1–5Custom radius (only used with 'custom' mode): • 0.5: Fine detail sharpening • 1.0: Balanced sharpening • 2.0: Broad sharpening
custom_amountoptFLOAT0.50.1–2Custom amount (only used with 'custom' mode): • 0.3: Subtle sharpening • 0.5: Moderate sharpening • 1.0: Strong sharpening
overshoot_protectionoptBOOLEANtrueEnable overshoot artifact protection: • True: Prevent halo artifacts • False: Maximum sharpening effect

Outputs (2)

NameTypeDescription
sharpened_imageIMAGE
processing_infoSTRING