CADE 2.5: Adaptive Detail Enhancer
- CADE 2.5 is a training-free, sampler-level guidance stack for latent diffusion models that uses frequency decoupling, energy rescaling, and zero-projection to improve image fidelity.
- It integrates a spectral EMA and the QSilk Micrograin Stabilizer to dynamically adjust the guidance process, injecting fine micro-texture while suppressing artifacts.
- CADE 2.5 delivers robust performance at moderate guidance scales by preserving global tone and enhancing micro-details without requiring any model retraining.
CADE 2.5 (Comfy Adaptive Detail Enhancer) is a training-free, sampler-level guidance stack for latent diffusion models, specifically targeting Stable Diffusion (SD) and SDXL pipelines. The central module, ZeResFDG, unifies three distinct enhancements of classifier-free guidance (CFG): frequency-decoupled signal reweighting, per-sample energy rescaling, and zero-projection to control artifacts and oversaturation. A spectral exponential moving average (EMA) with hysteresis adapts the detail-seeking behavior throughout the sampling schedule, while the QSilk Micrograin Stabilizer provides additional robustness and fine texture via quantile clamping and micro-detail injection at inference time. CADE 2.5 achieves improved sharpness, prompt adherence, and artifact suppression at moderate guidance scales, and operates without any model retraining (Rychkovskiy et al., 14 Oct 2025).
1. Motivation and High-Level Principles
Standard classifier-free guidance in latent diffusion models augments the conditional denoising prediction with an offset from the unconditional branch , typically as for scale . While effective for fidelity, high guidance scales often induce oversaturated regions, halo artifacts, and loss of micro-detail, particularly at high resolution or with aggressive prompt adherence. CADE 2.5 addresses these failure modes through ZeResFDG, incorporating:
- Frequency-decoupled guidance: Applies distinct gains to the low- and high-frequency components of the guidance offset.
- Energy rescaling: Matches the per-sample magnitude of the new prediction to that of .
- Zero-projection: Subtracts off any guidance in the unconditional direction, counteracting drift.
A dynamic guidance response is achieved by monitoring high-frequency energy through a spectral EMA, switching between conservative and detail-seeking modes as sampling progresses. The QSilk Micrograin Stabilizer, applied during inference, enforces numerical stability and injects visually natural high-frequency micro-texture.
2. ZeResFDG: Component Algorithms
2.1 Frequency-Decoupled Guidance
At each denoising step, let be the raw guidance. is split into low- and high-frequency bands by applying a Gaussian low-pass filter :
- (low-frequency)
- (high-frequency)
These bands are reweighted:
0
with 1 (global structure) and 2 (micro-detail). This enables selective enhancement of textural fidelity without destabilizing coarse features.
2.2 Energy Rescaling
Let 3. Calculate 4, 5. Apply:
6
Blend with the non-rescaled prediction using a parameter 7:
8
This mitigates overexposure by tethering the augmentation to the energy of the conditional estimate.
2.3 Zero-Projection
The projection coefficient of 9 onto 0 is computed:
1
Then, 2 is the guidance residual orthogonal to the unconditional branch. Optionally, FDG is applied to 3:
4
and the next prediction is formed as:
5
This step suppresses drift and provides a normalization anchor for guidance.
2.4 Spectral EMA and Hysteresis Mode Selection
Define the instantaneous high-frequency ratio:
6
This ratio is tracked through an exponential moving average:
7
With hysteresis thresholds 8, a mode variable 9 switches:
- If 0: activate "RescaleFDG" (detail-seeking)
- If 1: activate "CFGZeroFD" (conservative)
- Else: retain previous mode
This algorithmic adaptivity allows ZeResFDG to emphasize structure in early stages and micro-detail in later denoising steps.
3. QSilk Micrograin Stabilizer
The QSilk stabilizer is an inference-time, training-free correction enhancing the robustness of CADE 2.5:
- Quantile clamp (QClamp): Each denoising step clips the image tensor at the 2 and 3 per-sample quantiles:
4
This removes extreme values to prevent instabilities and color noise.
- Depth/Edge-Gated Micro-Detail Injection: Near the end of the noise schedule, injects a small high-frequency residual:
5
with 6 a fine Gaussian blur, 7 suppressing sharpening at strong edges, and 8 enhancing micro-texture where the normalized depth map is high. 9 ramps up late in the schedule. This process yields natural, high-resolution textures at negligible computational cost.
4. Integrated Sampling Loop and Implementation
CADE 2.5 operates as a pure Python/NumPy wrapper at the sampler level. For each denoising step, the process is as follows:
- Compute raw guidance 0 and split into frequency bands.
- Update spectral EMA and hysteresis mode 1.
- Based on 2, choose "CFGZeroFD" or "RescaleFDG" branch:
- "CFGZeroFD": zero-project 3 on 4, FDG on residual, reconstruct.
- "RescaleFDG": FDG on 5, rescale, blend.
- Optionally mask using attention or spatial selection.
- Return result; apply QSilk stabilization if enabled.
Default hyperparameters: 6; 7; 8; 9; 0; percentiles 1 for QClamp; 2 up to 3 late in the schedule (Rychkovskiy et al., 14 Oct 2025).
5. Evaluation and Applicability
Qualitative outcomes across highly structured prompts in portraits, hands, and textures confirm that CADE 2.5 preserves global tone and composition while enhancing high-frequency detail and reducing typical CFG artifacts such as oversaturation and haloing. Improvements are most pronounced at moderate guidance (4 in 5), with stable convergence and no retraining overhead. No quantitative distributional metrics were reported; assessment is visual. CADE 2.5 is compatible with both standard 6 and velocity parameterizations (the latter detailed in the appendix).
Compatibility: CADE 2.5 is applicable to SD and SDXL latent diffusion samplers. Optional features include NAG attention normalization, spatial masking for sensitive regions, and early-step exposure bias.
6. Significance and Positioning
CADE 2.5 exemplifies a sampler-side, training-free intervention for latent diffusion, aiming for robust image fidelity, texture realism, and effective artifact management without modifying underlying model weights or architecture. ZeResFDG's combined frequency and energy manipulation, in tandem with statistically-informed stabilization, addresses documented failure modes of large-scale CFG in high-resolution, prompt-sensitive regimes. The approach is general with respect to parameterization choice, model scale, and prompt complexity, subject to the limitations imposed by base model expressivity and memory constraints.
A plausible implication is that similar adaptive, frequency-aware guidance frameworks, with minimal computational overhead, may become standard in modern diffusion pipelines as resolution demands and application scope expand (Rychkovskiy et al., 14 Oct 2025).