Nodes/zsq_prompt/Image Sharpen
ComfyUI Node

Image Sharpen

The Unsharp Mask You Didn't Know ComfyUI Was Missing

By windfancy·Created 2 years ago·Updated 5 months ago· 2
Image Sharpen
  • image
  • image
percent150
threshold30
radius1.0
image_outputPreview
save_prefixComfyUI

Sharpening is the last step of half my workflows, and it's the step ComfyUI's core set makes you assemble yourself. imageSharpen is one node that does it. Feed it an image, tell it how aggressive to get, and out comes a crisper version you can preview, save, or hand to whatever comes next.

What it actually does

Under the hood it's a classic unsharp mask, straight out of PIL: the node blurs a copy of your image, subtracts that blur from the original, and adds the difference back scaled by percent. Result: edges get a contrast kick while flat areas stay put. That's the same trick Photoshop's "Unsharp Mask" has used for decades, and it's why the output reads as "sharper" rather than "harsher."

The inputs that matter

You set three things and leave the rest alone:

  • percent (100–300, default 150) - how strong the effect is. 150 is a gentle wake-up; 250+ starts to look crunchy.
  • threshold (0–100, default 30) - how much of a luminance difference counts as an "edge." Higher means only strong edges get sharpened, which is how you avoid amplifying noise in flat sky and skin.
  • radius (0–5, default 1) - how far the effect spreads from an edge. Keep it at 1 unless the image is big; cranked radius is how you get those white halo outlines nobody wants.

The remaining two, image_output (Hide/Preview/Save/Hide/Save) and save_prefix, are the pack's standard output handling, so you can stop the node from spitting previews into the queue. Output is a single image you wire into a VAE decode pass, a save node, or a further post-process.

Where people get burned

The classic mistake is sharpening before you upscale. It does nothing useful there - you're just pre-emphasizing pixels that are about to be thrown away. The right home for this node is after an upscale or at the very end of the pipeline. Second mistake: maxing every slider and wondering why the image has halos. Sharpening rewards restraint, and threshold is the knob that keeps the noise out.

Installing it

The pack is windfancy/zsq_prompt - in ComfyUI Manager, search "zsq_prompt" and install, then restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/windfancy/zsq_prompt

Restart ComfyUI and you're done. One warning: the pack's requirements.txt installs a lot of heavy stuff (transformers, ultralytics, onnx, opencv-contrib-python) that this node doesn't need - most of it serves the pack's background-removal and Fooocus-style nodes. If opencv-contrib-python fights an opencv you already had, that's dependency hell from the pack, not from this node. And if Manager flashes a "conflicting" warning next to zsq_prompt's name, it's because the pack uses very generic class names that overlap with other packs - the community's standing advice is to ignore that warning unless you're actually installing both.

Verdict

It's a one-trick node, but it's the exact trick you'll want in a tenth of your workflows. For a sharpening post-step that doesn't drag in a whole model or a six-node detour, this is the one I'd reach for.

CategoryZSQ/Image

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
percentINT150100–300
thresholdINT300–100
radiusFLOAT1.00–5
image_outputCOMBOPreview4 options: Hide, Preview, Save, Hide/Save
save_prefixSTRINGComfyUI

Outputs (1)

NameTypeDescription
imageIMAGE