[论文解读] High-Resolution Image Synthesis with Latent Diffusion Models
潜在扩散模型(LDMs)在经过预训练的自编码器下,通过感知等效、低维潜在空间来训练扩散模型,实现高分辨率图像合成,计算成本显著降低,并可灵活使用跨注意力对文本或布局进行条件化。
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 .
研究动机与目标
- 在像素空间外,在潜在空间中训练与采样以降低扩散模型的计算需求。
- 通过高效的自编码,保持高保真和细节,同时实现兆像素级合成。
- 引入基于跨注意力的扩散,以适应文本、语义地图、布局等多模态输入的可变条件化。
- 在无条件、条件、修复和超分辨率任务中展示具竞争力或最先进的结果,并提供可重用的预训练模型。
提出的方法
- 训练一个感知型自编码器,以学习低维潜在空间 z = E(x),并通过受控下采样因子 f;使用解码器 D 从 z 重构 x。
- 以目标 L_LDM = E_{E(x), ε ~ N(0,1), t}[||ε − ε_θ(z_t, t)||^2] 为训练目标,其中 z_t 是第 t 步的受噪声潜在变量。
- 通过跨注意力扩展 UNet 主干,以通过领域特定的编码器 τ_θ(y) 对生成进行条件化,使其能够处理文本、语义布局或其他输入。
- 实现一个两阶段框架,其中扩散在潜在空间中进行,从而降低计算,同时利用适合图像数据的 CNN 基于 2D 卷积。
- 通过基于跨注意力的机制实现灵活的条件化,支持文本到图像、布局到图像等多模态任务(通过无分类器引导来提升质量)。
- 提供可重用的预训练潜在编码器/解码器和 LDM,以用于不同任务(无条件、文本到图像、修复、超分辨率)。
实验结果
研究问题
- RQ1在学习的潜在空间中运行的扩散模型是否能够在降低训练和采样成本的同时达到像素空间扩散的质量?
- RQ2跨注意力条件是否能够在潜在扩散中实现稳健的多模态生成(文本、布局、语义地图)?
- RQ3感知压缩(潜在下采样因子 f)如何影响高分辨率任务中的合成质量与效率?
- RQ4LDM 是否能够在高分辨率下在无条件生成、文本到图像、修复和超分辨率等任务上提供具竞争力或最先进的结果?
- RQ5预训练的潜在自编码器是否可以在不同扩散模型和任务之间重复使用?
主要发现
- 在学习的潜在空间中的潜在扩散能够实现高分辨率强合成,且计算成本显著低于像素空间扩散。
- 无条件的 LDM 在 CelebA-HQ、FFHQ、LSUN-Churches、LSUN-Bedrooms 和 ImageNet 分类条件下实现最先进或具竞争力的 FID 与精确度/召回率,参数和训练资源更少。
- 跨注意力条件化能够实现有效的文本到图像、布局到图像和语义合成,并在 MS-COCO 文本到图像任务上取得有竞争力的结果,所需参数比同类 AR 或扩散基线更少。
- LDM-SR(超分辨率)在 FID 和感知质量方面表现强劲,常常超越 SR3 的 FID,同时保持有竞争力的感知指标;用户研究更偏好基于 LDM 的输出。
- 在潜在空间的卷积采样 enables 较大尺度的图像生成(高达兆像素级),并具有一致的质量和比像素空间扩散方法更高的采样吞吐。
- 总体而言,LDM 提供了一个灵活、可重复使用的框架,在不牺牲保真度的前提下,降低对计算的需求,覆盖多种高分辨率图像合成任务。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。