NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Clockwork Diffusion: Efficient Generation With Model-Step Distillation

Amirhossein Habibian, Amir Ghodrati, Noor Fathima, Guillaume Sautière, Risheek Garrepalli, Fatih Porikli, Jens Petersen

TL;DR

This paper introduces "Clockwork Diffusion," a novel method to significantly speed up text-to-image diffusion models by intelligently reusing computations from earlier denoising steps. By approximating lower-resolution feature maps within the UNet, Clockwork Diffusion achieves substantial reductions in computational cost (FLOPs and latency) with minimal impact on image quality, making diffusion models more practical for real-world applications.

What Problem Does This Paper Address?

Diffusion models, while excellent at generating high-quality and diverse images, are notoriously slow. This is primarily due to the computationally expensive UNet architecture that performs denoising operations repeatedly across many steps. The core challenge is to accelerate this process without sacrificing the fidelity and semantic coherence of the generated images. Existing methods often focus on reducing the number of sampling steps or optimizing individual steps, but this paper identifies that not all parts of the UNet are equally critical at every stage of the diffusion process.

Methods

Clockwork Diffusion is built on the observation that lower-resolution feature maps within the UNet are less sensitive to perturbations and primarily influence the overall semantic layout of the image, while higher-resolution features are more critical for fine details. The method leverages this by:

  • Model-Step Distillation: Instead of running the full UNet at every denoising step, Clockwork Diffusion uses a lightweight "adaptor" to approximate the computations for lower-resolution features. This adaptor reuses representations from previous sampling steps, effectively combining model distillation (replacing parts of the model) and step distillation (reusing information across steps).
  • Clockwork Scheduling: To prevent error accumulation, the method strategically alternates between using the lightweight adaptor and performing a full UNet pass. This "clockwork" schedule is crucial for maintaining high-quality outputs.
  • Efficient Adaptor Design: The authors propose a compact adaptor architecture that minimizes computational overhead.
  • Unrolled Trajectory Training: A novel training approach is introduced that uses full sampling trajectories starting from noise, allowing for efficient training without requiring an image dataset.

Datasets

  • Training: The method is trained using captions from the LAION-5B dataset. The training process does not require an image dataset.
  • Evaluation:
    • Text-to-Image Generation: MS-COCO 2017 (5K captions) and MS-COCO 2014 (30K captions) validation sets.
  • Image Editing: ImageNet-R-TI2I dataset.

Key Insights and Ideas

  • Layer Sensitivity Varies: Not all UNet layers contribute equally to the final image quality at every diffusion step. Lower-resolution layers are more robust and can be approximated.
  • Alternating is Key: Simply replacing low-resolution parts of the UNet with an adaptor at all steps leads to error accumulation. Alternating between full UNet passes and adaptor steps (the "clockwork" schedule) is essential for maintaining quality.
  • Training without Images: The proposed unrolled trajectory training method allows for efficient training of the adaptor without needing paired image-text data, which is a significant advantage.
  • Complementary Optimization: Clockwork Diffusion can be combined with other efficiency techniques like step distillation and optimized samplers, further boosting performance.

Key Results

  • Significant Speedup: Clockwork Diffusion achieves substantial reductions in FLOPs and latency. For example, with Stable Diffusion v1.5 and 8 DPM++ steps, it saves 32% of FLOPs. For an optimized distilled Efficient UNet, it reduces FLOPs by 38% at 8 sampling steps.
  • Minimal Quality Degradation: These speedups are achieved with negligible degradation in FID and CLIP scores, and in some cases, even slight improvements in FID.
  • Image Editing Efficiency: For text-guided image editing using Plug-and-Play (PnP), Clockwork Diffusion reduces latency by approximately 25-35% while maintaining or improving CLIP scores and only slightly degrading structural similarity.
  • Broad Applicability: The method demonstrates consistent improvements across various diffusion models, including Stable Diffusion v1.5, Efficient UNet, and Distilled Efficient UNet.

Limitations and Future Work

  • Fixed Operating Point: Similar to step distillation, Clockwork Diffusion is trained for a specific operating point (number of steps, scheduler) and doesn't easily allow for drastic changes to these parameters post-training.
  • Understanding Unrolled Training: The authors note that while their unrolled training method works well, the exact reasons for its superiority over regular distillation at low steps are not fully understood.
  • UNet-Based Models: The current work focuses on UNet-based diffusion models. It's unclear how well the approach translates to other architectures like ViT-based models.
  • Future Work: The paper suggests exploring optimizations for PnP, such as caching actual activations instead of latents, and modifying the generation loop to avoid unnecessary computations when the adaptor is used. Further investigation into understanding the unrolled training mechanism and extending the approach to other model architectures are also promising directions.

Summary updated

BibTeX
@inproceedings{habibian2023clockwork,
  author = {Amirhossein Habibian and Amir Ghodrati and Noor Fathima and Guillaume Sautière and Risheek Garrepalli and Fatih Porikli and Jens Petersen},
  title = {{Clockwork Diffusion: Efficient Generation With Model-Step Distillation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=yr0XLvrYrE},
}
Figure