Papers
Topics
Authors
Recent
Search
2000 character limit reached

CADE 2.5: Adaptive Detail Enhancer

Updated 3 June 2026
  • 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 ycy_c with an offset from the unconditional branch yuy_u, typically as yu+s (yc−yu)y_u + s\,(y_c - y_u) for scale s>1s>1. 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 ycy_c.
  • 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 Δ=yc−yu\Delta = y_c - y_u be the raw guidance. Δ\Delta is split into low- and high-frequency bands by applying a Gaussian low-pass filter GσG_\sigma:

  • Δℓ=Gσ∗Δ\Delta_\ell = G_\sigma * \Delta (low-frequency)
  • Δh=Δ−Δℓ\Delta_h = \Delta - \Delta_\ell (high-frequency)

These bands are reweighted:

yuy_u0

with yuy_u1 (global structure) and yuy_u2 (micro-detail). This enables selective enhancement of textural fidelity without destabilizing coarse features.

2.2 Energy Rescaling

Let yuy_u3. Calculate yuy_u4, yuy_u5. Apply:

yuy_u6

Blend with the non-rescaled prediction using a parameter yuy_u7:

yuy_u8

This mitigates overexposure by tethering the augmentation to the energy of the conditional estimate.

2.3 Zero-Projection

The projection coefficient of yuy_u9 onto yu+s (yc−yu)y_u + s\,(y_c - y_u)0 is computed:

yu+s (yc−yu)y_u + s\,(y_c - y_u)1

Then, yu+s (yc−yu)y_u + s\,(y_c - y_u)2 is the guidance residual orthogonal to the unconditional branch. Optionally, FDG is applied to yu+s (yc−yu)y_u + s\,(y_c - y_u)3:

yu+s (yc−yu)y_u + s\,(y_c - y_u)4

and the next prediction is formed as:

yu+s (yc−yu)y_u + s\,(y_c - y_u)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:

yu+s (yc−yu)y_u + s\,(y_c - y_u)6

This ratio is tracked through an exponential moving average:

yu+s (yc−yu)y_u + s\,(y_c - y_u)7

With hysteresis thresholds yu+s (yc−yu)y_u + s\,(y_c - y_u)8, a mode variable yu+s (yc−yu)y_u + s\,(y_c - y_u)9 switches:

  • If s>1s>10: activate "RescaleFDG" (detail-seeking)
  • If s>1s>11: 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 s>1s>12 and s>1s>13 per-sample quantiles:

s>1s>14

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:

s>1s>15

with s>1s>16 a fine Gaussian blur, s>1s>17 suppressing sharpening at strong edges, and s>1s>18 enhancing micro-texture where the normalized depth map is high. s>1s>19 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:

  1. Compute raw guidance ycy_c0 and split into frequency bands.
  2. Update spectral EMA and hysteresis mode ycy_c1.
  3. Based on ycy_c2, choose "CFGZeroFD" or "RescaleFDG" branch:
    • "CFGZeroFD": zero-project ycy_c3 on ycy_c4, FDG on residual, reconstruct.
    • "RescaleFDG": FDG on ycy_c5, rescale, blend.
  4. Optionally mask using attention or spatial selection.
  5. Return result; apply QSilk stabilization if enabled.

Default hyperparameters: ycy_c6; ycy_c7; ycy_c8; ycy_c9; Δ=yc−yu\Delta = y_c - y_u0; percentiles Δ=yc−yu\Delta = y_c - y_u1 for QClamp; Δ=yc−yu\Delta = y_c - y_u2 up to Δ=yc−yu\Delta = y_c - y_u3 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 (Δ=yc−yu\Delta = y_c - y_u4 in Δ=yc−yu\Delta = y_c - y_u5), with stable convergence and no retraining overhead. No quantitative distributional metrics were reported; assessment is visual. CADE 2.5 is compatible with both standard Δ=yc−yu\Delta = y_c - y_u6 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).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CADE 2.5.