Nodes/MKRShift_Nodes/Sharpen Pro
ComfyUI Node

Sharpen Pro

X1SharpenPro is the finish pass you actually want

By criskb·Created 7 months ago·Updated 5 months ago· 0
Sharpen Pro
  • image
  • mask
  • image
  • mask
  • sharpen_info
settings_json{"mode":"unsharp","radius":1.6,"amount":1.05,"threshold":0.015,"halo_suppress":0.4,"luma_only":true,"mix":1.0,"mask_feather":8.0,"invert_mask":false}

Every diffusion image is slightly soft, and the stock answer - crank a sharpen filter - is how you get that crunchy, halo'd "I ran it through a filter app" look. x1SharpenPro is the version that doesn't do that. It's an unsharp-mask-style sharpen with a threshold gate, halo suppression, luma-only mode, and a mask output, all wrapped in a single node from the MKRShift pack. If you're finishing a frame instead of just generating it, this is the sharpen pass you'll actually leave in the graph.

How it works

There's no "sharpen" magic, and the post-processing rules here apply straight: sharpening is blur-and-difference. The node blurs a copy of your image, subtracts it to isolate the high-frequency detail, and adds that detail back scaled by an amount. The trick is what it does around that core.

A plain unsharp mask boosts everything, including the noise and the edges where overshoot turns into halos. x1SharpenPro adds a threshold gate - only detail stronger than the threshold gets sharpened, so flat skin and clean skies stay untouched while edges pop. Then halo_suppress clips how far the overshoot can go (the code literally scales the boost down as you raise it). Crank amount on a dumb sharpen and you get white rings around every edge; here the halo knob is right there waiting for you. And with luma_only on (the default), it sharpens luminance only, which is what keeps color noise from getting amplified along with the detail.

It's worth saying that radius is "what counts as detail" - small radius sharpens fine texture, large radius starts to act like a local contrast bump. Start at the default 1.6 and nudge.

The inputs that matter

Everything except the image lives in one settings_json string - that's the pattern across most of the MKRShift x1 nodes. Open it, and you edit a JSON blob with the keys you care about:

  • amount (default 1.05) - how hard the detail gets added back.
  • radius (1.6) - the blur size, i.e. what counts as detail.
  • threshold (0.015) - the noise/edge gate.
  • halo_suppress (0.40) - the halo clamp. Your friend.
  • luma_only (true) - sharpen brightness, leave color alone.
  • mix (1.0) - wet/dry blend back to the original.

The optional mask input limits the effect to a region; mask_feather and invert_mask live in the JSON. Outputs are the sharpened image, a mask (the edge map the effect actually touched, so you can see what got hit), and sharpen_info - a string that logs the settings and mask coverage. Wire that into a text preview if you want to verify what ran.

Installing it

MKRShift Nodes is one broad pack, not a single node - you get all of it at once. ComfyUI Manager: search "MKRShift", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart ComfyUI. The x1 image nodes are pure numpy/PIL/torch - no model downloads, no heavy deps. (The pack does ship video/audio and G-code nodes; those want ffmpeg and a slicer installed, but nothing here needs them.)

Common issues

The one that bites everyone: settings_json is JSON. If you break the braces or leave a trailing comma, the node silently falls back to defaults rather than erroring - which is great for not crashing and terrible for debugging "why is my sharpen doing nothing." If an edit has no effect, check the JSON first. You can also right-click the settings field and convert it to an input, then drive it from a string-formatting node, which keeps you from hand-editing JSON every run.

And a small tip: feed this from an upscaler, not from a model pass. Sharpening the output of a real upscale gives it back the crispness that gets smeared in the resize; sharpening a low-res image to fake detail just amplifies whatever's already wrong.

CategoryMKRShift Nodes/VFX/Photo

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"mode":"unsharp","radius":1.6,"amount":1.05,"threshold":0.015,"halo_suppress":0.4,"luma_only":true,"mix":1.0,"mask_feather":8.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
sharpen_infoSTRING