Nodes/Advanced Photo Grain/Frequency Separation Sharpen
ComfyUI Node

Frequency Separation Sharpen

Frequency Separation, GPU Edition

By tritant·Created about a year ago·Updated about a month ago· 7
Frequency Separation Sharpen
  • image
  • IMAGE
radius2.0
strength1.0
threshold0.000
halo_limit0.00

Most "sharpen" nodes are unsharp mask in a trench coat: they crank the global contrast of edges, and you trade softness for white halos around every hard contour plus a fresh helping of amplified noise. That's the standard failure mode of post-upscale sharpening - the image gets crisp and simultaneously looks like it's glowing. FreqSeparationSharpen does it differently: it splits the image into low and high frequencies, amplifies only the high-frequency detail, and recombines. Colors and overall contrast don't move at all - only the micro-detail does. It's the difference between "crisp" and "crunchy," and this node errs on the crisp side.

Reach for it when your image is soft but otherwise fine: a big upscale that went mushy, an aggressive quantization that flattened the fine texture, or a Flux output that's technically sharp but feels painted-on smooth. The author's own docstring says it's for recovering "the edge definition lost to aggressive quantization" - which is the exact problem post-upscale sharpening exists to solve. It won't invent detail that isn't there, but it'll pull every bit of definition that is.

How it works

The mechanism is classic frequency separation, done with two separable 1D convolutions instead of one 2D blur - linear cost in the radius instead of quadratic, which is why it stays snappy at big radius values:

  1. Gaussian-blur the image (sigma = radius) → this is the low frequency layer, the broad shapes and color.
  2. Subtract: high = image − low → only the fine detail remains.
  3. Scale the high layer by strength, then add it back to the low layer.

Because the low-frequency base is untouched, hue and contrast are preserved - sharpening can't shift your colors or throw off the exposure the way an unsharp pass sometimes does. Reflect padding avoids darkening the image edges.

The two inputs that matter

There are only two (plus the IMAGE in), which makes this a deceptively simple node:

  • radius - the blur radius, i.e. the scale of detail you're targeting. Small (1–3) = per-pixel fine detail; large (10+) = broader structures. Start at 2.
  • strength - the amplification of the high-frequency layer. 1.0 is neutral (no effect), values above 1 boost detail, up to 10.

The single IMAGE output feeds a Save/Preview or the next post-process stage - put this after your upscaler, not before it, or you'll sharpen the softness before the resolution is even there.

Install

Same pack as PhotoFilmGrain, so the install is identical and dependency-free - one Python file, no model downloads, nothing to pip install beyond what ComfyUI already ships:

cd ComfyUI/custom_nodes
git clone https://github.com/tritant/ComfyUI-Advanced-Photo-Grain
# restart ComfyUI

Or in ComfyUI Manager, search "Advanced Photo Grain". The node shows up under image/enhancement as "Frequency Separation Sharpen."

Gotchas

  • At the defaults it does nothing. Here's the trap: strength defaults to 1.0, which the code short-circuits as a no-op and returns your image unchanged. People plug it in, queue, see no difference, and assume it's broken. It isn't - raise strength to ~1.5–2.5 and you'll see it kick in.
  • Radius too small + strength too high = noise amplification. If your output gets gritty instead of detailed, you're grabbing pure high-frequency junk; bump the radius up to 3–4.
  • Strength over ~4 will still halo. Frequency separation reduces halos but doesn't ban them - it just pushes them way up the strength range. If you see liserés on hard edges, back the strength off before touching anything else.
  • It's GPU and batch-aware, so it handles whole batches of frames in one call - fine for animation or video passes where you want the same sharpening on every frame.
Categoryimage/enhancement

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
radiusFLOAT2.00.1–50Rayon du flou. Petit = detail fin, grand = structures larges.
strengthFLOAT1.00–101.0 = neutre. Au-dela, les hautes frequences sont amplifiees.
thresholdoptFLOAT0.0000–0.2Sous ce seuil les details restent intacts, au-dessus ils sont accentues. Evite de renforcer le bruit. 0 = tout accentuer.
halo_limitoptFLOAT0.000–1Plafonne l'amplitude des hautes frequences pour eviter les lisereres sur les contours francs. 0 = desactive.

Outputs (1)

NameTypeDescription
IMAGEIMAGE