Nodes/Photography Nodes/Sharpen Unsharp Mask
ComfyUI Node

Sharpen Unsharp Mask

The Photoshop sharpen you're used to, as a node

By TrophiHunter·Created about a year ago·Updated about a year ago· 5
Sharpen Unsharp Mask
  • image
  • IMAGE
radius1.00
strength1.00

AI images come out of the VAE a little soft, and a lot of people reach for the wrong fix - upscaling and hoping. Upscalers give you pixels, not detail. This node gives you the classic Photoshop treatment: unsharp mask. It's a two-slider node that does exactly what the Photoshop filter does, which makes it the one I'd grab when a generated image needs crispness added after the resize, without the oversharpening halo that naive "sharpen everything" filters spray all over edges.

How it works

Unsharp mask is misleadingly named - there's no unsharpening involved. The node blurs a copy of your image, subtracts that blurred version from the original to isolate the high-frequency detail (the "mask"), and adds that difference back on top of the original, scaled by strength. Blur the image, find what the blur killed, and re-add just that. That's why it sharpens edges without blowing up flat areas into noise.

The mechanism is real gaussian blur via separable convolution with a kernel sized from radius (radius * 4, forced odd, minimum 3) and sigma equal to the radius. Bigger radius = wider, softer sharpening that catches larger features; small radius = the fine, toothy detail. Output is clamped to 0–1 so you can't blow highlights out into pure white with a heavy hand.

Inputs that matter

Only three, and only two you'll touch:

  • radius - 0–100, default 1.0. Width of the sharpening. Keep it small (0.5–2) for a normal photo/illustration; reach higher if you're sharpening something that was already heavily blurred
  • strength - 0–10, default 1.0. How much of the high-frequency detail gets added back. This is your main dial

That's it. One IMAGE in, one IMAGE out, ready to wire into Save Image.

Install

It ships in the Photography Nodes pack, so install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/TrophiHunter/ComfyUI_Photography_Nodes

Restart ComfyUI and look under TrophiHunter/Photography. Or use ComfyUI Manager and search "Photography Nodes" (pack title "ComfyUI_Photography_Nodes"). The pack is pure torch/PIL/numpy - no requirements.txt, no model downloads, nothing heavy.

Where people get burned

The classic mistake is cranking strength to fix an image that isn't actually soft - you get the white-halo-on-edges look that screams "sharpened in MS Paint." Two sliders tempt you into fighting; remember that on a normal 1024px generation, radius 1 and strength 0.5–1.5 is the sweet spot. This is also a finishing node: run it after upscaling (upscalers re-soften), not before, and keep it late in the chain - in the author's example workflow it sits after the optical effects, near the end, which is exactly where sharpening belongs. If your source is genuinely out of focus, no amount of unsharp mask saves it - that's a detail-reconstruction problem, not a sharpen problem.

CategoryTrophiHunter/Photography

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
radiusFLOAT1.000–100
strengthFLOAT1.000–10

Outputs (1)

NameTypeDescription
IMAGEIMAGE