Reusing Computation in Text-to-Image Diffusion for Efficient Generation of Image Sets

Dale Decatur, Thibault Groueix, Wang Yifan, Rana Hanocka, Vladimir Kim, Matheus Gadelha

TL;DR

This paper introduces a training-free method to significantly reduce the computational cost of generating sets of images from text prompts using diffusion models. By clustering similar prompts and sharing early denoising steps, they achieve substantial speedups (up to 76%) while maintaining or even improving image quality, making large-scale image generation more accessible and sustainable.

What Problem Does This Paper Address?

Text-to-image diffusion models, while incredibly powerful for generating realistic and diverse images from text descriptions, are notoriously computationally expensive. Generating a single image can consume significant energy. In practice, users rarely generate just one image; instead, they create collections of variations to explore ideas and refine outputs. Existing research has focused on optimizing the generation of single images. This paper tackles the problem of optimizing the generation of sets of images, specifically addressing the redundancy that arises when generating multiple images from similar text prompts. The core challenge is to leverage the inherent structure of diffusion models and the semantic similarity between prompts to avoid redundant computations.

Methods

The core idea is to exploit the "coarse-to-fine" nature of diffusion models. Early denoising steps primarily define structural content (layout, composition), while later steps refine fine-grained details. The authors propose a training-free approach that clusters prompts based on semantic similarity.

  1. Hierarchical Embedding Tree: They construct a tree structure where leaf nodes represent individual text prompts, and internal nodes represent the average embedding of their children. This is achieved using agglomerative clustering on prompt embeddings.
  2. Adaptive Embedding Selection: A function f(y, k) is defined to select which node's embedding to use at diffusion step k for a given prompt y. At early steps, embeddings from higher-level (more general) nodes are used, and as denoising progresses, the selection moves down the tree towards the specific leaf node embedding for that prompt.
  3. Heterogeneity Score: A "heterogeneity score" is introduced for each node, measuring the semantic distance between its children. This score, along with a parameter τ, controls how quickly the process moves from shared computations to prompt-specific ones. A linear function φ(k) maps diffusion steps to acceptable heterogeneity levels.
  4. Compute Reuse: By sharing computations at the root of the tree for early steps, the method avoids recomputing the same low-frequency structural information for similar prompts. As the process branches out, computations become specialized for finer details. This hierarchical structure reduces computational complexity from O(N) to O(log N) for N prompts.

Datasets

The authors evaluate their method on several datasets:

  • GenAI Bench [15]: A large dataset of 1600 text prompts created by artists for AI text-driven image generation, known for its diversity and complexity.
  • Prompt Template Dataset: A custom dataset of 2000 variations of the prompt "A <art style> painting of <subject>, <location>", generated using prompt templates to create semantically similar prompts.
  • Animals Dataset: A custom dataset of 500 prompts describing animals, generated by an LLM.
  • Image Styles Dataset: A custom dataset of 100 prompts describing image variations to the prompt "A child sitting on a swing, looking up at the stars, <style>".

Key Insights and Ideas

  • Prompt Similarity is Key: The core insight is that semantically similar prompts share significant computation in the early stages of diffusion, and this redundancy can be exploited.
  • Coarse-to-Fine Structure is Exploitable: The inherent coarse-to-fine generation process of diffusion models is not just a property but a mechanism that can be leveraged for efficiency.
  • Text-to-Image Priors Matter: Models trained with text-to-image priors (like Kandinsky and Karlo) tend to have a more gradual emergence of high-frequency details, making them more amenable to compute sharing than models that learn details earlier (like Stable Diffusion).
  • Hierarchical Clustering for Efficiency: A hierarchical structure naturally maps to the diffusion process, allowing for efficient sharing at the root and specialization towards the leaves.
  • Training-Free Advantage: The method is training-free, making it easily integrable into existing pipelines without the need for retraining expensive diffusion models.

Key Results

  • Significant Compute Savings: The method achieves substantial compute savings, with reported savings ranging from approximately 32% to up to 76% for generating image sets. For example, generating 100 style variations saved 74% of the compute.
  • Comparable or Superior Quality: Despite the significant reduction in compute, the generated images maintain or even achieve superior quality (measured by VQA Score) compared to standard diffusion methods. At fixed compute budgets, their approach often outperforms standard diffusion with more steps.
  • Scalability: The approach scales favorably with the number of prompts.
  • Model Suitability: Models trained with text-to-image priors show better performance with this method due to their diffusion dynamics.

Limitations and Future Work

  • Model Dependence: The method is most effective for diffusion models where detail generation is evenly distributed throughout the process. Models like Stable Diffusion, which establish structural information very early, offer fewer opportunities for effective sharing.
  • Diversity vs. Homogeneity: Performance is best for small, homogeneous sets or large, diverse sets. Small, highly diverse sets may see less benefit.
  • Future Work: The authors are interested in extending this approach to autoregressive models, particularly those that generate images in a coarse-to-fine manner via next-scale prediction. They also suggest exploring non-linear mappings for the φ(k) function.

Summary updated

BibTeX
@inproceedings{decatur2025reusing,
  author = {Dale Decatur and Thibault Groueix and Wang Yifan and Rana Hanocka and Vladimir Kim and Matheus Gadelha},
  title = {{Reusing Computation in Text-to-Image Diffusion for Efficient Generation of Image Sets}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure