Ensembling Diffusion Models via Adaptive Feature Aggregation

Cong Wang, Kuan Tian, Yonghang Guan, Fei Shen, Zhiwei Jiang, Qing Gu, Jun Zhang

Abstract

Adaptive Feature Aggregation (AFA) is a novel ensembling framework that dynamically combines multiple "expert" diffusion models at the feature level, rather than merging their weights into a static model. By utilizing a lightweight, spatial-aware aggregator that considers the prompt, denoising step, and image location, AFA produces images with significantly higher aesthetic quality and better prompt alignment than traditional merging techniques.

Introduction: The Limits of Static Model Merging

The open-source community has produced a wealth of "expert" diffusion models fine-tuned for specific styles, subjects, or domains. Naturally, researchers and practitioners want to combine these experts to create a highly capable "super-model."

Currently, the standard approach is Model Merging (e.g., Weighted Merging or Merge Block Weighted). These are "static" methods: they average the weights of different models once to create a single new model. However, this approach overlooks a critical dynamic: a model’s denoising capability is not constant. One model might be better at generating textures in early steps, while another excels at fine details in late steps. Similarly, one might be better at rendering faces while another handles backgrounds more effectively. Static merging ignores these dynamic shifts across time, space, and prompts, leading to suboptimal generation.

Methodology: Adaptive Feature Aggregation (AFA)

To address the limitations of static merging, the authors propose Adaptive Feature Aggregation (AFA), which shifts the fusion process from the weight level to the feature level.

  1. Parallel Denoisers: Instead of creating one merged U-Net, AFA runs multiple frozen "expert" U-Nets in parallel.
  2. Spatial-Aware Block-Wise (SABW) Aggregator: This is the core innovation of the paper. Between the blocks of the U-Nets, a lightweight module (approximately 50M parameters) is inserted. It takes the intermediate features from all models and computes a spatial attention map.
  3. Dynamic Weighting: This attention map dictates how much each model should contribute to every specific pixel or patch of the image at that exact denoising step. The aggregator is "state-aware," meaning it evaluates the textual prompt (via cross-attention) and the current timestep to make its routing decisions.
  4. Efficiency: Only the SABW module is trained; the massive underlying diffusion models remain completely frozen. This makes training relatively inexpensive and prevents the catastrophic forgetting of the experts' original fine-tuned knowledge.

Datasets and Evaluation

The researchers utilized a variety of datasets for training and rigorous evaluation:

  • Training: 10,000 samples from JourneyDB.
  • Evaluation:
    • COCO 2017 and Draw Bench Prompts for standard quality and alignment metrics.
  • DiffusionDB and LAION-COCO to test generalization.
  • Base Models: The team tested groups of popular SDv1.5-based models (like EpicRealism and RealisticVision), as well as larger architectures like SDXL and FLUX.1 [dev].

Key Insights and Ideas

The "Win Rate" Visualization

A foundational premise of the paper is that different models excel at different times and in different areas of an image.

Win rate visualization across denoising steps and spatial locations

By measuring which model predicts noise most accurately (the "win rate"), the authors demonstrate that the optimal model changes constantly throughout the 1000-step denoising process and across different spatial bounding boxes. This empirical evidence proves that static merging is fundamentally sub-optimal compared to dynamic, step-and-space-aware aggregation.

Contextual Intelligence and Step Resilience

AFA demonstrates remarkable improvements in "counting" and object binding. In qualitative tests, when prompted for "a single clock," base models often hallucinated multiple clocks. AFA correctly identified which expert features led to a single-object composition and suppressed the conflicting features from other models.

Furthermore, AFA-ensembled models are surprisingly robust to low-step counts. While a base model's quality might degrade significantly at 10 or 20 steps, AFA maintains high visual fidelity. The ensemble effectively "fills in the gaps" that appear when an individual model is undersampled.

Key Results

  • Quantitative Superiority: AFA consistently outperformed baselines like MagicFusion and AutoMBW across nearly all metrics, including FID (image quality), CLIP score (text alignment), and human-preference proxies like HPSv2 and Image Reward.
  • Aesthetic Boost: In the "Draw Bench" evaluation, AFA achieved an Image Reward score of 0.4388 (Group I), significantly higher than the best individual base model (0.3922).
  • Efficiency Trade-off: While running multiple models in parallel requires more compute than running one, the authors show that an AFA ensemble running for only 20 steps can outperform a single model running for 50 steps. This results in a faster total wall-clock time for higher-quality generations.

Limitations and Future Work

  • VRAM Requirements: Because AFA requires keeping multiple U-Nets in memory simultaneously, it has higher VRAM demands than a single merged model. This may limit its use on consumer-grade GPUs when ensembling massive models (like multiple FLUX.1 instances).
  • Architectural Lock-in: Currently, AFA only works for models that share the identical base architecture. For example, you can ensemble three different SDXL models, but you cannot ensemble an SD1.5 model with an SDXL model because their internal feature dimensions do not match.
  • Distillation Difficulties: The authors attempted to distill the AFA ensemble into a 1-4 step model using Latent Consistency Distillation (LCM), but the results were unsuccessful. They hypothesize that keeping the base model parameters frozen during distillation might be the primary bottleneck, presenting an area for future research.

Summary updated

BibTeX
@inproceedings{wang2025ensembling,
  author = {Cong Wang and Kuan Tian and Yonghang Guan and Fei Shen and Zhiwei Jiang and Qing Gu and Jun Zhang},
  title = {{Ensembling Diffusion Models via Adaptive Feature Aggregation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=e32cI4r8Eo},
}
Figure