Nodes/SDXL Auto Prompter/APNext Sharpen FX
ComfyUI Node

APNext Sharpen FX

In-graph unsharp mask for your renders

By dagthomas·Created 3 years ago·Updated 13 days ago· 283
APNext Sharpen FX
  • images
  • image
strength1.0
radius1.0
threshold0
methodunsharp_mask

Sometimes a render comes out a touch soft - after an upscale, after a VAE decode that eats fine detail, or just because the model played it safe. APNext Sharpen FX is the in-graph fix so you don't have to round-trip the image through Photoflop. It's one of the image-effect nodes in dagthomas's "SDXL Auto Prompter" pack (which, despite the name, is a big grab-bag of prompt tools and post-processing FX), and it does exactly one thing well: sharpen an image tensor.

It's not doing anything exotic - it's the same family of sharpening you'd find in any photo editor - but having it live in the ComfyUI graph means you can sharpen conditionally, between passes, or right before saving, all without leaving your workflow. That's the whole pitch, and it's a good one.

How it works

It takes your decoded IMAGE and runs a sharpening pass on it, then hands back the sharpened image. Three methods are on offer via the method dropdown: unsharp_mask (the default and the one you want 90% of the time - the classic detail-boost that works by subtracting a blurred copy), high_pass (a harsher edge-frequency boost), and edge_enhance (leans into outlines). It's a pure tensor operation, so no model and no API key - it runs on whatever's already in your graph.

The inputs that matter

  • images - the image to sharpen. Wire this from your VAE Decode or upscaler output.
  • strength (default 1, range 0–5) - how hard it sharpens. 1 is a sane default; push toward 2–3 for a soft upscale, and back off if edges start to crunch.
  • radius (default 1, range 0.1–10) - the size of the detail it acts on. Small radius = fine texture; large radius = broad local contrast. For most renders 1–2 is right.
  • threshold (default 0, range 0–255) - the protect-the-flats control. At 0 it sharpens everything, including noise in smooth skies and skin. Nudge it up and low-contrast areas are left alone while edges still get sharpened - this is the setting that keeps sharpening from amplifying grain.
  • method - start with unsharp_mask.

The single output is image, which you feed onward to a Save Image, another FX node, or a compositing step.

How to install it

ComfyUI Manager: search comfyui_dagthomas, install, restart. Manual:

cd ComfyUI/custom_nodes && git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas && pip install -r requirements.txt

then restart. The requirements.txt installs the whole pack's stack - blend-modes, color_matcher, scipy for the FX nodes, plus openai, anthropic, google-generativeai, transformers and decord for the LLM and video nodes the same repo ships. The FX nodes really only lean on the imaging libraries; decord is the dependency most likely to fail a build, and if it does, the FX and prompt nodes generally still load.

Where people get burned

  • Over-sharpening. High strength plus small radius gives you that gritty, over-processed halo look. If edges are getting bright outlines, drop strength or raise radius.
  • Sharpening noise. With threshold at 0, any grain in flat areas gets crunched up along with the detail you wanted. Raise the threshold to protect skies and skin.
  • Order matters. Sharpen after upscaling, not before - sharpening first just gives the upscaler crunchy input to enlarge. And sharpen last, right before saving, so later steps don't blur your work back out.
  • high_pass and edge_enhance are aggressive. They're there for stylistic bite, not general cleanup. For "make this render a little crisper," stick with unsharp_mask.
Categorycomfyui_dagthomas/APNext FX

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
strengthFLOAT1.00–5
radiusFLOAT1.00.1–10
thresholdINT00–255
methodCOMBOunsharp_mask3 options: unsharp_mask, high_pass, edge_enhance

Outputs (1)

NameTypeDescription
imageIMAGE