


*Example output showing original (left) and enhanced image (right)*
*high_freq_mult: 2 is an extreme value to show the difference (demo only).*
This custom ComfyUI node performs selective latent denoising and detail enhancement using Fourier Transform (FFT) techniques. It intelligently separates image frequencies to:
Ideal for refining AI-generated images while maintaining sharp features and eliminating graininess.
Supports models:
cd ComfyUI/custom_nodes
git clone https://github.com/lrzjason/comfyui-latent-frequency-enhancer.git
latent → enhancement → Latent Frequency Enhancer (lrzjason)sampling → HFEPostProcessor (lrzjason)Uses FFT to split latent into:
Creates a dynamic mask using:
Outputs a mask preview showing:
The HFEPostProcessor node applies high-frequency enhancement during the sampling process rather than after it. This approach:
| Parameter | Default | Range | Description |
|———–|———|——-|————-|
| Detail Strength (HF Mult) | 1.15 | 1.0-2.0 | Multiplier for high-frequency details (values >1 enhance details) |
| Frequency Split Sigma | 2.0 | 0.1-20.0 | Controls frequency separation sharpness (higher = more low frequencies preserved) |
| Noise Threshold | 0.05 | 0.0-1.0 | Minimum magnitude to preserve details (higher = more aggressive denoising) |
| Mask Hardness | 2.0 | 1.0-100.0 | Transition sharpness in noise suppression (higher = sharper cutoff) |
| Noise Grouping (Pre-Blur) | 0.5 | 0.0-1.0 | Pre-blur strength for noise coherence (0.0 disables) |
| Parameter | Default | Range | Description |
|———–|———|——-|————-|
| Model | – | – | The diffusion model to use for sampling |
| Steps | 8 | 1-10000 | Total number of sampled steps |
| HFE Steps | 2 | 1-100 | Number of steps to apply high-frequency enhancement |
| Latent Image | – | – | The latent image to enhance |
| Noise Seed | 0 | 0-18446744073709551615 | Random seed for noise generation |
| CFG Scale | 1.0 | 0.0-100.0 | Classifier-free guidance scale |
| Sampler Name | – | Various | Name of the sampler to use |
| Scheduler | – | Various | Scheduler to use for sampling |
| Positive | – | – | Positive conditioning |
| Negative | – | – | Negative conditioning |
| Detail Strength (HF Mult) | 1.05 | 1.0-2.0 | Multiplier for high-frequency details during enhancement |
| Frequency Split Sigma | 5.0 | 0.01-20.0 | Controls frequency separation during enhancement |
| Noise Threshold | 0.05 | 0.0-1.0 | Minimum magnitude to preserve details during enhancement |
| Mask Hardness | 2.0 | 0.01-100.0 | Transition sharpness in noise suppression during enhancement |
| Noise Grouping (Pre-Blur) | 0.5 | 0.0-1.0 | Pre-blur strength for noise coherence during enhancement |
The Latent Frequency Enhancer node outputs two items:
enhanced_latent)The processed latent ready for decoding
mask_preview)Visual representation of the processing mask
The HFEPostProcessor node outputs one item:
LATENT)The final processed latent after both sampling and enhancement
Detail Strength for sharper outputsNoise Threshold for noisy generationsFrequency Split Sigma for cartoon/anime stylesSteps parameter should match your basic sampling stepsHFE Steps to specify how many steps to apply high-frequency enhancementDetail Strength values (1.05-1.15) compared to post-process modeFrequency Split Sigma (5.0+) may work better during samplingNote: This is a research-grade implementation. Results may vary based on model and generation parameters. Always validate outputs visually.
[](LICENSE)
*For research and personal use only. Not for commercial deployment without permission.*
|
Buy me a coffee: |
WeChat: |