By decomposing the image formation process into a sequential application of denoising autoencoders, diffusion models (DMs) achieve state-of-the-art synthesis results on image data and beyond. Additionally, their formulation allows for a guiding mechanism to control the image generation process without retraining. However, since these models typically operate directly in pixel space, optimization of powerful DMs often consumes hundreds of GPU days and inference is expensive due to sequential evaluations. To enable DM training on limited computational resources while retaining their quality and flexibility, we apply them in the latent space of powerful pretrained autoencoders. In contrast to previous work, training diffusion models on such a representation allows for the first time to reach a near-optimal point between complexity reduction and detail preservation, greatly boosting visual fidelity. By introducing cross-attention layers into the model architecture, we turn diffusion models into powerful and flexible generators for general conditioning inputs such as text or bounding boxes and high-resolution synthesis becomes possible in a convolutional manner. Our latent diffusion models (LDMs) achieve a new state of the art for image inpainting and highly competitive performance on various tasks, including unconditional image generation, semantic scene synthesis, and super-resolution, while significantly reducing computational requirements compared to pixel-based DMs. Code is available at https://github.com/CompVis/latent-diffusion .
核心贡献 · Key contributions
提出潜在扩散模型(LDM),在预训练自编码器的潜在空间中应用扩散,降低计算成本同时保持质量。 Propose Latent Diffusion Models (LDMs) that apply diffusion in latent space of pretrained autoencoders, reducing computational cost while maintaining quality.
通过潜在空间训练实现复杂度降低与细节保留之间的近最优平衡,提升视觉保真度。 Achieve near-optimal balance between complexity reduction and detail preservation via latent space training, boosting visual fidelity.
在 UNet 骨干中引入交叉注意力层,实现对文本、边界框等的灵活条件控制,支持高分辨率合成。 Introduce cross-attention layers into UNet backbone for flexible conditioning on text, bounding boxes, etc., enabling high-resolution synthesis.
在图像修复上达到新最优,在无条件生成、语义合成和超分辨率上表现竞争力。 Set new state-of-the-art on image inpainting and competitive performance on unconditional generation, semantic synthesis, and super-resolution.
相比基于像素的扩散模型显著降低训练和推理成本,例如在修复中加速 2.7 倍。 Significantly reduce training and inference costs compared to pixel-based diffusion models, e.g., 2.7x speedup in inpainting.
发布预训练模型供多任务复用,使强大扩散模型更易获取。 Release pretrained models for reuse across multiple tasks, democratizing access to powerful diffusion models.
局限 · Limitations
顺序采样过程仍慢于 GAN,限制实时应用。 Sequential sampling process is still slower than GANs, limiting real-time applications.
自编码器的重建能力可能成为需要细粒度像素精度任务(如超分辨率)的瓶颈。 Reconstruction capability of autoencoder can bottleneck tasks requiring fine-grained pixel accuracy, e.g., super-resolution.
可能被滥用于制造深度伪造、传播虚假信息及泄露敏感训练数据。 Potential for misuse in creating deepfakes, spreading misinformation, and revealing sensitive training data.
两阶段训练可能加剧数据中的偏差,尽管模式覆盖优于 GAN。 Two-stage training may exacerbate biases present in data, though mode coverage is better than GANs.
在某些任务(如 LSUN-Bedrooms)上性能略低于 ADM 等专用模型,尽管资源消耗更低。 Performance on some tasks (e.g., LSUN-Bedrooms) slightly below specialized models like ADM despite lower resource use.
论文章节 · Sections(共 15)
摘要Abstract
1 引言1 Introduction
2 相关工作2 Related Work
3 方法3 Method
3.1 感知图像压缩3.1 Perceptual Image Compression
3.2 潜在扩散模型3.2 Latent Diffusion Models
3.3 条件机制3.3 Conditioning Mechanisms
4 实验4 Experiments
4.1 感知压缩权衡4.1 On Perceptual Compression Tradeoffs
4.2 潜在扩散图像生成4.2 Image Generation with Latent Diffusion
4.3 条件潜在扩散4.3 Conditional Latent Diffusion
4.4 潜在扩散超分辨率4.4 Super-Resolution with Latent Diffusion