Dynamic Importance in Diffusion U-Net for Enhanced Image Synthesis

Xi Wang, Ziqi He, Yang Zhou

Abstract

Traditional diffusion models typically employ a U-Net architecture. Previous studies have unveiled the roles of attention blocks in the U-Net. However, they overlook the dynamic evolution of their importance during the inference process, which hinders their further exploitation to improve image applications. In this study, we first theoretically proved that re-weighting the outputs of the Transformer blocks within the U-Net is a "free lunch" for improving the signal-to-noise ratio during the sampling process. Next, we proposed the Importance Probe to uncover and quantify the dynamic shifts in importance of the Transformer blocks throughout the denoising process. Finally, we designed an adaptive importance-based re-weighting schedule tailored to specific image generation and editing tasks. Experimental results demonstrate that our approach significantly improves the efficiency of the inference process and enhances the aesthetic quality of the samples with identity consistency. Our method can be seamlessly integrated into any U-Net-based architecture.

Introduction

Standard diffusion models, such as Stable Diffusion, rely on a U-Net architecture composed of interleaved Transformer and ResNet blocks. While it is well-understood that different layers specialize in different image features—low-resolution layers manage global layout while high-resolution layers handle fine details—most current sampling methods treat these blocks as having static importance throughout the generation process.

This paper addresses the missed opportunity of ignoring the temporal evolution of block importance. As an image progresses from pure Gaussian noise to a structured visual, the critical components of the neural network shift. By failing to account for these dynamic shifts, models often suffer from inefficiencies and struggles with maintaining identity consistency or fine-grained detail. The authors propose a framework to identify and exploit these dynamic importance shifts to achieve a "free lunch" in image synthesis quality.

Methodology: The Importance Probe and Adaptive Re-weighting

The core of the proposed method is a framework designed to monitor and exploit the "dynamic importance" of U-Net blocks without requiring additional training.

Theoretical Foundation

The authors provide a mathematical proof demonstrating that re-weighting Transformer block outputs can reduce the variance of noise prediction error. This reduction effectively increases the Signal-to-Noise Ratio (SNR) during the sampling process, leading to cleaner image generation in fewer steps.

Importance Probe (IP) and Voting

To quantify block importance, the researchers developed the Importance Probe (IP). Using a "Teacher-Student" setup, a Student U-Net attempts to mimic the noise predictions of the original Teacher model while its block weights are systematically perturbed. Because the importance of a block can vary based on the specific initial noise seed, the probe is run multiple times. A Voting Mechanism then determines a stable "importance rank" for each block at every timestep of the denoising process.

The U-Net architecture showing the distribution of Transformer blocks across different 'floors' (resolutions) in the Encoder and Decoder.

Adaptive Re-weighting Schedule

Once the importance ranks are established, an adaptive schedule is applied. "Dominant" blocks (those with high importance at a given timestep) receive a slight boost (weight > 1.0), while less critical blocks are slightly attenuated (weight < 1.0). This targeted allocation of influence ensures the model focuses its representational power where it matters most at each stage of generation.

Experimental Results and Key Insights

The researchers evaluated their method across several popular models, including SD v2.1, SDXL, and their "Turbo" variants, using the Human Preference Dataset v2 (HPS v2) to quantify aesthetic improvements.

Key Findings on U-Net Dynamics

  • The Bottleneck Priority: The "mid-block" (the lowest resolution floor) consistently maintains high importance throughout the entire denoising process, acting as the structural anchor of the image.
  • Decoder Dominance: Despite the structural symmetry of the U-Net, the encoder and decoder are not equally important. Blocks in the decoder were found to be significantly more critical for final image quality.
  • Temporal Role Shifts: Early in the denoising process, mid-to-low resolution blocks (responsible for layout) dominate. As the process nears completion, importance shifts toward high-resolution blocks that manage fine textures and details.
Comprehensive results showing improvements in sampling efficiency (a), visual aesthetics (b), identity consistency (c), and the fidelity of pruned sampling (d).

Performance Gains

  • Efficiency: The adaptive schedule allows models to reach higher aesthetic quality in fewer steps. For instance, SD-Turbo at 2 steps with re-weighting outperformed the vanilla model at 3 steps.
  • Aesthetic and Consistency: Across all models, the method yielded higher HPS v2 scores. Notably, it maintained better identity consistency than static methods like FreeU, which can sometimes distort the subject's identity while trying to enhance the background.
  • Pruning: The importance ranking accurately identifies redundant blocks. By skipping less important blocks during inference, the authors achieved faster sampling with minimal loss in image fidelity.

Conclusion

By uncovering the dynamic nature of block importance in U-Nets, this research provides a simple yet powerful tool for enhancing diffusion models. The proposed adaptive re-weighting schedule offers a "free lunch" for improving image quality and sampling efficiency. While the initial probing phase introduces a one-time computational cost, the resulting inference-time improvements are significant and generalize well across various generative tasks. Future work may focus on automating the determination of weight ranges and further refining the probing process for specialized domains.

Summary updated

Abstract

Traditional diffusion models typically employ a U-Net architecture. Previous studies have unveiled the roles of attention blocks in the U-Net. However, they overlook the dynamic evolution of their importance during the inference process, which hinders their further exploitation to improve image applications. In this study, we first theoretically proved that, re-weighting the outputs of the Transformer blocks within the U-Net is a "free lunch" for improving the signal-to-noise ratio during the sampling process. Next, we proposed Importance Probe to uncover and quantify the dynamic shifts in importance of the Transformer blocks throughout the denoising process. Finally, we design an adaptive importance-based re-weighting schedule tailored to specific image generation and editing tasks. Experimental results demonstrate that, our approach significantly improves the efficiency of the inference process, and enhances the aesthetic quality of the samples with identity consistency. Our method can be seamlessly integrated into any U-Net-based architecture. Code: https://github.com/Hytidel/UNetReweighting
BibTeX
@misc{wang2025dynamic,
  author = {Xi Wang and Ziqi He and Yang Zhou},
  title = {{Dynamic Importance in Diffusion U-Net for Enhanced Image Synthesis}},
  year = {2025},
  eprint = {2504.03471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.03471},
  howpublished = {arXiv},
}
Figure