Nodes/ComfyUI-DonutNodes/Donut Sharpener (from reference) (DEPRECATED)
ComfyUI Node

Donut Sharpener (from reference) (DEPRECATED)

The reference-based Donut sharpener

By DonutsDelivery·Created about a year ago·Updated about 15 hours ago· 25
Donut Sharpener (from reference) (DEPRECATED)
  • input_image
  • reference_image
  • enhanced_image
  • enhancement_report
  • spectral_analysis
enhancement_strength1.0
frequency_bands16
spectral_modefull_spectrum
blend_factor0.8

Donut Sharpener (from reference) is the interesting half of the pack's old sharpener pair - the one that was actually worth using. It takes your AI-generated image and a real photo, then matches the generated image's frequency spectrum to the reference photo's noise characteristics. That's a clever answer to a very specific problem: AI images look "plastic" because they lack the natural noise structure real photographs have. Rather than adding a generic grain preset, this node copies the spectral fingerprint of your reference.

It's now deprecated - folded into Donut Spectral Sharpener as the external_reference mode - but it's kept registered so older workflows still load. If you're on a current install, you'll want the successor; if a downloaded workflow references this exact node, it will still run.

What it did

The mechanism is genuinely different from a normal sharpen. It decomposes the input image into frequency bands, and the reference too, then adjusts the input's band structure toward the reference's so the texture character - the grain, the micro-contrast, the "is this a photo" feel - transfers over. It preserves brightness by treating amplitude and phase separately, and uses a darken blend when recombining to stop bright edges from haloing.

Inputs, for when you meet it in an old workflow:

  • input_image and reference_image - both required. The reference is the whole point; pick a photo whose texture you like.
  • enhancement_strength - how far to push the spectral matching.
  • frequency_bands - 8–32 bands to slice the spectrum into; more bands, more precision, more compute.
  • spectral_mode - full_spectrum, high_freq_only, or adaptive. high_freq_only limits the transfer to fine detail, which is the safe default for subtlety.
  • blend_factor - how much result vs. original to keep.

Three outputs: enhanced_image, and the diagnostic strings enhancement_report and spectral_analysis. (Unlike the sibling "Donut Sharpener," there's no noise_reference image output - the reference comes from you, not from synthesis.)

Should you care?

The idea is good and the honest version of this idea - matching a reference image's spectral texture - is more robust than a fixed grain filter because it adapts to what the reference actually looks like. Two caveats, though. First, it's a per-image post-process, not a pipeline you'll run on every generation; it shines on hero shots where you want a photograph's finish. Second, the mainstream community has largely moved past spectral tricks for this job - detailers and generative upscalers solve "adds believable micro-detail" more reliably. Use this when you specifically want reference-matched texture and have a good photo to match.

For new work, use Donut Spectral Sharpener with reference_source set to external_reference - it's the same engine, one node, and it falls back gracefully if you leave the reference unwired.

Install

Part of the ComfyUI-DonutNodes pack: ComfyUI Manager → search "DonutNodes" → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
cd donutnodes
python -m pip install -r requirements.txt

Dependencies: opencv-python-headless, scipy, matplotlib, psutil, tqdm, requests. Nothing to download, nothing model-sized.

Categorydonut/enhancement

Inputs (6)

NameTypeDefaultDescription
input_imageIMAGE
reference_imageIMAGE
enhancement_strengthoptFLOAT1.00–1000
frequency_bandsoptINT168–32
spectral_modeoptCOMBOfull_spectrum3 options: full_spectrum, high_freq_only, adaptive
blend_factoroptFLOAT0.80–1

Outputs (3)

NameTypeDescription
enhanced_imageIMAGE
enhancement_reportSTRING
spectral_analysisSTRING