Abstract
Text-to-image diffusion models have achieved remarkable success in generating high-quality images, yet providing precise spatial control remains a significant hurdle. Current approaches either require extensive retraining or suffer from slow sampling and artifacts due to model mismatch. We present EMControl, a framework that treats conditional control as a blind inverse problem. By utilizing the Expectation-Maximization (EM) algorithm in a learnable latent space, EMControl provides efficient, high-fidelity guidance with a fraction of the training cost of existing methods.
Introduction
The ability to guide diffusion models with spatial constraints—such as Canny edges, depth maps, or semantic segmentation—is crucial for practical creative workflows. However, existing methods face a dilemma: training-heavy adapters like ControlNet are computationally expensive to develop, while training-free methods often fail to align perfectly with conditions due to the "domain gap" between noisy latents and clean guidance images.
EMControl bridges this gap by introducing a learnable latent forward operator and a correctional mechanism, framing the generation process as an iterative optimization problem solved via Expectation-Maximization.
Methodology
The core of EMControl is the shift from pixel-level comparisons to latent-space consistency.
Latent Forward Operator ($A_\theta$)
To avoid the computational burden of decoding noisy latents into pixels at every step, EMControl employs a small U-Net trained to map noisy latents directly to the latent space of the desired condition. This approach is both faster and more robust to the noise inherent in the diffusion process.
EM-Based Sampling
Generation is treated as a blind inverse problem. During the reverse diffusion process, the framework performs an iterative EM procedure:
- E-step: Estimates the distribution of the latent variables.
- M-step: Updates a learnable correction term ($\psi$) to minimize the discrepancy between the model's output and the guidance signal.
This process ensures that the generated images strictly adhere to the provided conditions while remaining on the natural image manifold.
Experimental Evaluation
EMControl was trained on 156,000 images from COCO2017 for spatial tasks and 81,000 images from Wiki-Art for style guidance. Performance was evaluated using FID for quality and CLIP scores for text alignment.
Key Findings
- Efficiency: EMControl requires only 20 GPU hours for training, compared to over 500 hours for ControlNet, representing a 25x improvement in training efficiency.
- Sampling Speed: The method is approximately 7x faster than existing training-free guidance methods like Freedom.
- Versatility: The framework successfully handles single and multiple simultaneous conditions, such as combining depth maps with stylistic guidance.
Discussion and Limitations
While EMControl offers significant improvements in speed and efficiency, the guidance scale ($\lambda$) remains a critical hyperparameter. High guidance scales can lead to color distortions, necessitating careful tuning for specific tasks. Future research will focus on automating scale selection and expanding the framework to more abstract control modalities.
Conclusion
EMControl provides a robust and efficient solution for adding conditional control to diffusion models. By leveraging the EM algorithm in latent space, it achieves the alignment quality of trained adapters with the flexibility and speed required for real-time creative applications.
Summary updated