Classifier-Free Guidance (CFG) is a cornerstone of modern text-to-image models, yet its reliance on a semantically vacuous null prompt (∅) generates a guidance signal prone to geometric entanglement. This is a key factor limiting its precision, leading to well-documented failures in complex compositional tasks. We propose Condition-Degradation Guidance (CDG), a novel paradigm that replaces the null prompt with a strategically degraded condition, cdeg. This reframes guidance from a coarse "good vs. null" contrast to a more refined "good vs. almost good" discrimination, thereby compelling the model to capture fine-grained semantic distinctions. We find that tokens in transformer text encoders split into two functional roles: content tokens encoding object semantics, and context-aggregating tokens capturing global context. By selectively degrading only the former, CDG constructs cdeg without external models or training. Validated across diverse architectures including Stable Diffusion 3, FLUX, and Qwen-Image, CDG markedly improves compositional accuracy and text-image alignment. As a lightweight, plug-and-play module, it achieves this with negligible computational overhead. Our work challenges the reliance on static, information-sparse negative samples and establishes a new principle for diffusion guidance: the construction of adaptive, semantically-aware negative samples is critical to achieving precise semantic control. Code is available at https://github.com/Ming-321/Classifier-Degradation-Guidance.
Figures & tables
Figure 1: Qualitative comparison between Classifier-Free Guidance (CFG) and our Condition-Degradation Guidance (CDG) across three state-of-the-art models (SD3, SD3.5, and Flux). These examples demonstrate CDG’s superior capability in handling complex compositional prompts where CFG often fails. CDG consistently outperforms CFG in accurate text rendering, precise spatial relationships and attribute binding, as well as complex object interactions.
Figure 2: CDG synthesizes a geometrically superior guidance signal compared to CFG. (Top) Geometric Decoupling: CDG maintains near-perfect orthogonality throughout generation, while CFG suffers from significant early-stage entanglement. (Bottom) Interference Energy Ratio: CDG exhibits minimal interference, in stark contrast to CFG’s substantial energy waste in misaligned directions. Together, these analyses demonstrate that CDG’s guidance signal is structurally cleaner and more efficient from its inception, explaining its enhanced compositional control.
Figure 3: An illustration of our proposed pipeline for constructing the semantically degraded condition, cdeg . The process begins with attention graph extraction (a–c), where the self-attention map (b) from a transformer block (a) is modeled as a graph (c). Next, the Weighted PageRank (WPR) algorithm is applied to compute an importance score for each token (d). Following our Stratified Degradation strategy, these scores are used to generate a binary mask m (e). Finally, the mask facilitates the construction of cdeg via masked interpolation (f) between the original condition c and the null condition ∅ .
Figure 4: WPR reveals a clear importance dichotomy between content and context-aggregating tokens: content tokens carry fine-grained semantics while context-aggregating tokens carry coarse-grained semantics, as exemplified by the prompt “A man is cooking, MineCraft Style.” (a) The stem plot shows that high importance scores (red for CLIP, cyan for T5) are almost exclusively concentrated on semantic content tokens. (b) The ranked list confirms that the top tokens (“minecraft”, “cooking”, “man”) are almost all content-related. This dichotomy motivates our Stratified Degradation strategy, which first degrades content tokens and then context-aggregating tokens for controllable semantic degradation.
Method
FID ↓
CLIP Score ↑
Aesthetic Score ↑
VQA Score ↑
SD3
CFG
35.69
31.73
5.66
91.44
CADS
36.16
31.72
5.65
91.44
ICG
39.09
31.41
5.79
90.89
SEG
41.90
30.28
5.56
84.15
PAG
50.60
30.15
5.52
81.27
SFG
38.92
31.72
5.52
90.52
Table 1: Quantitative comparison on the MS-COCO 2017 validation set. Results are shown for SD3, SD3.5, FLUX.1, and Qwen-Image. Best results in bold , second-best underlined . ( ↓ ) indicates lower is better, ( ↑ ) higher is better.
Table 3: Ablation study on CDG core components at fixed degradation budget ( Rdeg=1.1 ). ‘✓’ and ‘✗’ denote active and inactive components. Asterisk ( ∗ ) indicates reverse ranking (least important tokens).
Figure 5: Hyperparameter analysis: joint effect of intervention block ( λblock ) and Degradation Ratio ( Rdeg ) on SD3.
Figure 6: (a) Semantic degradation sequence under CFG* as Rdeg increases from 0.00 to 2.00. (b) Quantitative analysis.
Method
Time (s)
Aesthetic
VQA
CFG (Baseline)
5.456
5.66
91.44
CDG (Per-Step)
8.031 (+47.2%)
5.68
92.33
CDG
5.655 (+3.6%)
5.68
92.21
Table 4: Efficiency comparison of CDG implementation variants (one-time vs. per-step WPR computation) on SD3 with Rdeg=1.1 , λblock=1 .
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: Token importance scores computed via cross-attention summation for the prompt “A man is cooking, Minecraft Style.” The method incorrectly assigns highest importance to padding tokens rather than semantic content tokens.
Model
Approach
w
T
s
seed
σ
λblock
rcontent∣rCtxAgg
SD3
CFG
7
28
-
-
-
-
-
CADS
7
28
0.07
-
-
-
-
ICG
7
28
-
42
-
-
-
PAG
3
28
-
-
-
13
-
SEG
3
28
-
-
5
13
-
CDG
7
28
-
-
-
1
1.0 ∣ 0.0
Appendix
Table 5: Optimal hyperparameters for different models. (“-” denotes not used)
Figure 8: Hyperparameter ablation on SD3.5 and FLUX.1: Performance metrics (CLIP Score and VQA Score) as a function of Degradation Ratio Rdeg . Top row: CLIP Score; bottom row: VQA Score. Left column: SD3.5 results; right column: FLUX.1 results. For SD3.5, both metrics achieve their best performance around Rdeg=1.0 - 1.3 , exhibiting a stable plateau that is consistent with the SD3 analysis in the main text. For FLUX.1, metrics exhibit relative stability across the tested range, with Rdeg=1.0 providing a reliable initialization point.
Figure 9: Visual comparison of results generated by varying the degradation ratio Rdeg .
Figure 10: Comparison between unconditional generation (left) and context-aggregating-token-only guidance (right) for four prompts. The right column uses CFG ∗ with cdeg constructed by rcontent=1,rCtxAgg=0 .
Model
Method
Counting
Comparison
Differentiation
Negation
Universal
Avg
SD3
CFG
76.00
74.08
77.22
46.58
70.74
68.92
CADS
75.59
74.05
76.98
46.74
70.11
68.70
ICG
75.37
73.10
75.89
47.46
69.39
68.24
SEG
70.87
69.43
70.87
47.90
64.96
64.81
PAG
67.76
66.40
67.09
47.84
64.80
62.78
CDG (Ours)
76.50
74.86
78.26
46.24
71.53
69.48
Appendix
Table 6: Comprehensive GenAI-Bench evaluation results for advanced reasoning skills. For each skill dimension within each model, the best method is shown in bold and the second-best is underlined. CDG achieves the best performance in most dimensions, demonstrating its superior reasoning capabilities.
Model
Method
Action Relation
Attribute
Scene
Spatial Relation
Part Relation
Avg
SD3
CFG
79.06
77.23
76.67
78.66
76.35
77.59
CADS
78.84
77.05
76.51
78.55
76.36
77.46
ICG
77.95
76.42
75.77
78.09
74.96
76.64
SEG
72.57
71.98
71.28
73.50
70.99
72.06
PAG
68.58
68.35
66.95
69.65
68.75
68.46
CDG (Ours)
79.29
77.56
77.18
79.84
76.19
78.01
Appendix
Table 7: Comprehensive GenAI-Bench evaluation results for basic compositional skills. For each skill dimension within each model, the best method is shown in bold and the second-best is underlined. CDG consistently outperforms baseline methods across different models and skill types.
Method
FID ↓
CLIP ↑
Aes ↑
VQA ↑
CFG
35.69
31.73
5.66
91.44
CDG-C (CLIP only)
32.68
32.01
5.65
92.32
CDG-T (T5 only)
34.81
31.94
5.67
92.11
CDG (Both)
34.05
32.00
5.70
92.40
Appendix
Table 8: Encoder-specific ablation on SD3. -C/-T: CLIP/T5 only degradation.
Rdeg
FID ↓
CLIP ↑
Aes ↑
VQA ↑
WPR
Rand ∗
WPR
Rand ∗
WPR
Rand ∗
WPR
Rand ∗
1.1
33.80
34.17
31.98
32.02 ± 0.52
5.68
5.68 ± 0.16
92.27
92.27 ± 0.88
0.9
35.08
33.73
31.72
31.90 ± 0.95
5.67
5.67 ± 0.28
91.05
91.65 ± 1.57
Appendix
Table 9: WPR vs. Random ranking ablation on SD3.
Figure 11: Synergy with PAG: CDG provides the core semantic foundation, while PAG refines local details.
Figure 12: CDG for Text-Guided Editing: Correcting semantic errors where the baseline fails.
Figure 13: CDG for Controllable Generation: Providing semantic precision to render complex details under structural constraints.
Figure 14: More visual results on the SD 3 model.
Figure 15: More visual results on the SD 3.5 model.
Text-to-image diffusion models are capable of generating high-quality images, but suboptimal pre-trained text representations often result in these images failing to align closely with the given text prompts. Classifier-free guidance (CFG) is a popular and effective technique for improving text-image alignment in the generative process. However, CFG introduces significant computational overhead. In this paper, we present DIstilling CFG by sharpening text Embeddings (DICE) that replaces CFG in the sampling process with half the computational complexity while maintaining similar generation quality. DICE distills a CFG-based text-to-image diffusion model into a CFG-free version by refining text embeddings to replicate CFG-based directions. In this way, we avoid the computational drawbacks of CFG, enabling high-quality, well-aligned image generation at a fast sampling speed. Furthermore, examining the enhancement pattern, we identify the underlying mechanism of DICE that sharpens specific components of text embeddings to preserve semantic information while enhancing fine-grained details. Extensive experiments on multiple Stable Diffusion v1.5 variants, SDXL, and PixArt-α demonstrate the effectiveness of our method. Code is available at https://github.com/zju-pi/dice.
Zhenyu Zhou, Defang Chen, Can Wang +2
Zhejiang University, State Key Laboratory of Blockchain and Data Security · University at Buffalo, State University of New York
As Classifier-Free Guidance (CFG) has proven effective in conditional diffusion model sampling for improved condition alignment, many applications use a negated CFG term as a Negative Prompting (NP) to filter out unwanted features from samples. However, simply negating CFG guidance creates an inverted probability distribution, often distorting samples away from the marginal distribution. Inspired by recent advances in conditional diffusion models for inverse problems, here we present a novel method to achieve guidance toward the given condition using contrastive loss. Specifically, our guidance term aligns or repels the denoising direction based on the given condition through contrastive loss, achieving a similar guiding effect to traditional CFG for positive conditions while overcoming the limitations of existing negative guidance methods. Experimental results demonstrate that our approach effectively injects or removes the given concepts while maintaining sample quality across diverse scenarios, from simple class conditions to complex and overlapping text prompts.
Jinho Chang, Changsun Lee, Hyungjin Chung +1
Graduate School of Artificial Intelligence, Korea Advanced Institute of Science and Technology, Seoul, South Korea · EverEx, Seoul, South Korea
Inference-time quality-enhancement methods are an effective and widely adopted means of improving diffusion models without expensive retraining. We study a family of training-free techniques conceptually rooted in Classifier-Free Guidance (CFG), most of which were originally proposed on older U-Net diffusion models and validated using metrics that assess image quality in isolation, without accounting for compositional alignment or semantic correspondence between the generated image and its associated text prompt. We re-evaluate eight such methods on two open-weight rectified-flow transformers under a fixed per-model protocol and three compositional-alignment benchmarks. No method consistently improves on CFG across the measured criteria. APG obtains several nominal best scores, but the corresponding gains often remain within the estimated evaluation uncertainty. Attention-perturbation methods provide isolated gains on SD3.5 Medium and more frequent degradations on FLUX.2 [klein] 4B Base, while CFG remains a competitive lower-cost baseline.