ComfyUI Node

Sharpen

Unsharp mask in a node, for when your render looks soft

By isekai-sh·Created 9 months ago·Updated 8 months ago· 3
Sharpen
  • image
  • image
method
radius2.0
percent150
threshold3

IsekaiSharpen is a classic unsharp-mask node for ComfyUI: it takes an image that looks slightly soft and gives it back with crisper edges. If you've ever looked at a render and thought "that's just a bit blurry, but I don't want to regenerate," this is the cheap fix - pure PIL, no model, milliseconds. Just don't expect it to add detail; sharpening amplifies edges that are already there, it doesn't invent pixels.

How it works. You pick a method:

  • Sharpen - PIL's built-in sharpen filter. One click, no knobs, mild.
  • Unsharp Mask - the useful one. It's the classic film-technique-in-a-box: it blurs a copy of the image, subtracts it to find the edge detail, then adds that edge detail back weighted by percent. The three sliders are the whole game:
    • radius (0–10, default 2) - how wide an edge zone gets enhanced. Small for fine texture, larger for big soft edges.
    • percent (0–500, default 150) - how strongly the edge detail is amplified. 150 is a solid starting point; past ~300 you're in crunchy territory.
    • threshold (0–255, default 3) - how different a pixel must be from its neighborhood before it gets sharpened. A low threshold (like the default 3) sharpens everything including noise; raise it to spare smooth areas like skin and skies from becoming grainy.

The correct mental model: radius picks the feature size, percent picks the strength, threshold protects the flat areas. Tune in that order, and preview at 100% - sharpening artifacts (halos around edges) only reveal themselves at full zoom.

Output is a single image (IMAGE tensor), wired anywhere an image goes. It slots naturally at the end of a pipeline, right before save - after you've done your real upscaling, not before it. If you sharpen before upscaling, the upscaler will happily amplify your artifacts. If your image is genuinely low-res or soft, the KB's advice on upscaling still applies: sharpening is a finishing pass, and a real upscaler is the fix for missing detail.

Install. Same as the whole pack: ComfyUI Manager → search "isekai" → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/isekai-sh/isekai-comfy-node
cd isekai-comfy-node
pip install -r requirements.txt

Restart; it's under Isekai → Image/Effects. Nothing heavy - Pillow does the work.

Common issues. The usual pack suspects: it processes only the first image of a batch (loop per-image for batches), and on any error it logs [Isekai] Sharpen Error to the console and returns the original image unchanged - so "sharpening did nothing" is the node failing silently, not a subtle visual choice. And the classic sharpening mistakes apply here as always: cranking percent too high gives you ugly white halos along edges, and sharpening a noisy image with a low threshold turns noise into crunchy static. Start mild, look at the skin and sky, and back off if you see halos. Also worth remembering: this node is the "make it crisp" step, not the "fix a soft render" step - if the source is genuinely out of focus, no amount of unsharp mask rescues it, and you're better off regenerating or upscaling properly.

CategoryIsekai/Image/Effects

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
methodCOMBO2 options: Sharpen, Unsharp Mask
radiusoptFLOAT2.00–10
percentoptINT1500–500
thresholdoptINT30–255

Outputs (1)

NameTypeDescription
imageIMAGE