Donut Sharpener (from reference) (DEPRECATED)
The reference-based Donut sharpener
- input_image
- reference_image
- enhanced_image
- enhancement_report
- spectral_analysis
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, oradaptive.high_freq_onlylimits 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.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_image | IMAGE | — | |
| reference_image | IMAGE | — | |
| enhancement_strengthopt | FLOAT | 1.00–1000 | — |
| frequency_bandsopt | INT | 168–32 | — |
| spectral_modeopt | COMBO | full_spectrum | 3 options: full_spectrum, high_freq_only, adaptive |
| blend_factoropt | FLOAT | 0.80–1 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| enhanced_image | IMAGE | — |
| enhancement_report | STRING | — |
| spectral_analysis | STRING | — |