Nodes/Eric_Image_Processing_Nodes/SwinIR Sharpness Boost
ComfyUI Node

SwinIR Sharpness Boost

SwinIR restoration plus a tunable detail pass on top

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
SwinIR Sharpness Boost
  • image
  • enhanced_image
taskclassical_sr
model_variantauto
sharpness_profilebalanced
processing_strength0.90
detail_boost0.18
detail_radius1.2
device_preferenceauto

This is the standard SwinIR restoration node with a detail-enhancement pass bolted on top, and five sharpness presets so you don't have to hand-tune the blend yourself. If you've used the plain SwinIR nodes in this pack and found the output a touch soft for your taste, this is the version built specifically to address that - extract a high-frequency detail layer after restoration, re-emphasize it by a controlled amount, and blend it back in.

Where the extra sharpness comes from

After SwinIR does its restoration or super-resolution pass, this node extracts a detail layer by comparing the restored image against a Gaussian-blurred version of itself (detail_radius sets that blur's spread) - the difference between the two is, roughly, "everything finer than this radius." That detail layer gets re-added at a controlled strength (detail_boost), which is a more targeted way to add perceived sharpness than a blanket unsharp-mask pass on the whole image, since it's specifically working with detail SwinIR already recovered rather than inventing new edges from the raw output. processing_strength then blends the whole enhanced result against the original SwinIR output, so you can back off the entire effect without touching the two detail parameters individually.

It shares SwinIR's core dependency, though: this is still the underlying SwinIR restoration network doing the primary work, and it needs the same pretrained .pth weights the plain SwinIR nodes in this pack need. There's no separate download for the sharpness layer itself - that part is pure signal processing on whatever SwinIR handed it, so a missing-weights SwinIR pass will produce a sharpened version of a meaningless restoration, not a fix for the underlying problem.

Inputs and outputs that matter

  • sharpness_profile - the fast path. balanced (default, moderate boost), detail_boost (stronger emphasis, good on already-clean sources), denoise_priority (dials sharpening back in favor of the restoration doing more of the work, best when the source is noisy), film_preserve (gentler boost with a wider detail radius, aimed at not turning film grain into crunchy artifacts), superres_edges (aggressive, tight-radius sharpening for upscaled output). Pick custom to set processing_strength, detail_boost, and detail_radius by hand.
  • task and model_variant - same SwinIR task/weight selection as the plain SwinIR nodes (classical_sr, real_sr, color_dn, jpeg_car, and so on, each needing its matching weight file).
  • detail_boost (default 0.18, range 0–0.6) - how much of the extracted high-frequency layer gets re-added. Push past ~0.3 and halos start becoming visible on high-contrast edges.

Output: enhanced_image only.

Installing it

Through ComfyUI Manager, search Eric's Image Processing Nodes. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Image_Processing_Nodes
cd Eric_Image_Processing_Nodes
pip install -r requirements.txt

Restart ComfyUI. Then download the SwinIR .pth matching your chosen task/model_variant from the official SwinIR releases and drop it in Eric_Image_Processing_Nodes/models/ - see the pack's Docs/MODEL_WEIGHTS.md for the full filename list. Without it, the underlying SwinIR pass falls back to random weights silently, same as the plain SwinIR nodes in this pack, and the sharpness layer will just be emphasizing noise rather than real recovered detail.

Where people get burned

If output looks sharpened but wrong - edges emphasized around content that doesn't look properly restored underneath - check whether the base SwinIR weights actually loaded before touching detail_boost. This node's detail layer is only as good as what SwinIR handed it; sharpening a randomly-initialized restoration just makes its artifacts more visible, not more correct.

Assuming weights are loaded correctly, the second trap is picking superres_edges on a noisy source instead of a clean upscale target - that preset's tight detail radius and high boost were tuned for adding crispness to already-recovered structure, and on genuinely noisy input it'll sharpen the noise right along with everything else. denoise_priority or film_preserve are the safer starting points when the source itself isn't clean.

CategoryEric's Image Processing/Transformer Enhancements

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
taskCOMBOclassical_srSelect SwinIR restoration task
model_variantCOMBOautoChoose pretrained weight profile
sharpness_profileCOMBObalancedPreset tuning curves for restoration vs. sharpness
processing_strengthoptFLOAT0.900–1Blending weight between original and restored output
detail_boostoptFLOAT0.180–0.6High frequency emphasis after SwinIR processing
detail_radiusoptFLOAT1.20.3–2.5Gaussian radius used when extracting detail layer
device_preferenceoptCOMBOautoDevice override for SwinIR inference

Outputs (1)

NameTypeDescription
enhanced_imageIMAGE