[论文解读] LCM-LoRA: A Universal Stable-Diffusion Acceleration Module
LCM-LoRA 引入了一个通用的、无需训练的加速模块,基于 Latent Consistency Models 的 LoRA 蒸馏,能够在不需要额外训练的情况下,对所有 SD 模型和 LoRAs 实现快速、少步推理。
Latent Consistency Models (LCMs) have achieved impressive performance in accelerating text-to-image generative tasks, producing high-quality images with minimal inference steps. LCMs are distilled from pre-trained latent diffusion models (LDMs), requiring only ~32 A100 GPU training hours. This report further extends LCMs' potential in two aspects: First, by applying LoRA distillation to Stable-Diffusion models including SD-V1.5, SSD-1B, and SDXL, we have expanded LCM's scope to larger models with significantly less memory consumption, achieving superior image generation quality. Second, we identify the LoRA parameters obtained through LCM distillation as a universal Stable-Diffusion acceleration module, named LCM-LoRA. LCM-LoRA can be directly plugged into various Stable-Diffusion fine-tuned models or LoRAs without training, thus representing a universally applicable accelerator for diverse image generation tasks. Compared with previous numerical PF-ODE solvers such as DDIM, DPM-Solver, LCM-LoRA can be viewed as a plug-in neural PF-ODE solver that possesses strong generalization abilities. Project page: https://github.com/luosiallen/latent-consistency-model.
研究动机与目标
- 证明 LoRA 蒸馏可以将 Latent Consistency Models (LCMs) 扩展到更大规模的 Stable-Diffusion 变体(SD-V1.5、SSD-1B、SDXL)。
- 展示来自 LCM 蒸馏的 LoRA 参数可以作为通用加速模块,与风格 LoRA 无需再训练即可组合使用。
- 提供一个高效训练的路径,使跨越多样化的 SD 微调模型实现快速且高质量的文本到图像生成。
- 突出 LCM-LoRA 与现有基于 LoRA 的微调的兼容性,以及通过对 LoRA 向量线性组合实现风格迁移的潜力。
提出的方法
- 在预训练扩散模型之上应用 Latent Consistency Distillation (LCD),实现基于 LoRA 的参数高效。
- 在 LCD 过程中使用 LoRA 训练一小组更新矩阵,显著降低内存使用,同时将蒸馏结果转化为适用于 SD 变体的 LCMs。
- 引入加速向量(LCM-LoRA),并展示它可以与风格向量(style LoRA)线性组合,生成风格特定的快速生成模型,无需进一步训练。
- 证明 LCM-LoRA 可以被接入到 SD 微调模型或 SD LoRA 中,以实现极少采样步数下的快速推理。
- 给出将加速向量与风格向量组合的具体公式:theta_LCM' = theta_pre + tau_LCM'_LCM 且 tau_LCM'_LCM = lambda1 * tau' + lambda2 * tau_LCM。
实验结果
研究问题
- RQ1能否在使用低内存开销的前提下,将 Latent Consistency Distillation (LCD) 有效扩展到更大规模的 Stable-Diffusion 模型(SDXL、SSD-1B)?
- RQ2来自 LCD 的 LoRA 参数(LCM-LoRA)是否可作为跨越多种 SD 模型和 LoRA 的通用无训练加速器?
- RQ3LCM-LoRA 加速向量是否可以与风格特定的 LoRA 向量线性组合,以在不额外训练的情况下生成风格驱动的图像?
- RQ4在少量采样步数下,与传统 PF-ODE 求解器(DDIM、DPM-Solver)相比,LCM-LoRA 在速度和质量方面的表现如何?
主要发现
- LCM-LoRA 通过 LoRA 蒸馏在 SD-V1.5、SDXL、和 SSD-1B 上实现快速推理,所需步骤最少且内存降低。
- 来自 LCD 的 LoRA 参数在保持高质量结果的前提下,所需的可训练参数显著更少,适用于更大的基础模型(SDXL、SSD-1B)。
- LCM-LoRA 参数可以直接与其他风格 LoRA 组合,以在无需进一步训练的情况下生成风格特定的图像。
- 该方法在经过微调的 SD 模型和 LoRAs 上展现出强健的泛化能力,充当神经 PF-ODE 求解器插件。
- 相比 PF-ODE 求解器,LCM-LoRA 提供了一个训练无关、可泛化的潜在扩散模型加速机制。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。