2025-03-11 · 进阶 · 机器学习 · 计算机视觉

Efficient Distillation of Classifier-Free Guidance using Adapters

本文提出了一种名为AGD的轻量级适配器指导蒸馏方法,通过在单个前向传递中模拟无分类器指导(CFG),有效地将CFG的行为集成到模型中,从而将采样速度提高一倍,同时保持或提高样本质量。

更新于 2025-03-11。作者:Cristian Perez Jensen、Seyedmorteza Sadat。

中文摘要

而无需分类器的引导(CFG)对于条件扩散模型至关重要,但它将每个推理步骤中的神经函数评估(NFEs)数量翻倍。为了缓解这种低效性,我们引入了适配器引导蒸馏(AGD),这是一种新颖的方法,它通过单次前向传递模拟CFG。AGD利用轻量级适配器来近似CFG,有效地将采样速度翻倍,同时保持或提高样本质量。与先前调整整个模型的引导蒸馏方法不同,AGD保持基础模型冻结,仅训练少量额外的参数(约2%),从而显著降低蒸馏阶段的资源需求。此外,这种方法保留了原始模型权重,并使适配器能够与来自同一基础模型的其它检查点无缝结合。我们还通过在CFG引导轨迹上训练,而不是在标准扩散轨迹上训练,解决了现有引导蒸馏方法中训练和推理之间的关键不匹配问题。通过广泛的实验,我们表明AGD在多个架构上实现了与CFG相当或更优的FID,而NFEs数量只有后者的一半。值得注意的是,我们的方法能够在配备24GB VRAM的单个消费级GPU上蒸馏大型模型(约26亿参数),使其比需要多个高端GPU的先前方法更易于访问。我们将公开发布我们方法的具体实现。

英文摘要

While classifier-free guidance (CFG) is essential for conditional diffusion models, it doubles the number of neural function evaluations (NFEs) per inference step. To mitigate this inefficiency, we introduce adapter guidance distillation (AGD), a novel approach that simulates CFG in a single forward pass. AGD leverages lightweight adapters to approximate CFG, effectively doubling the sampling speed while maintaining or even improving sample quality. Unlike prior guidance distillation methods that tune the entire model, AGD keeps the base model frozen and only trains minimal additional parameters (sim2%) to significantly reduce the resource requirement of the distillation phase. Additionally, this approach preserves the original model weights and enables the adapters to be seamlessly combined with other checkpoints derived from the same base model. We also address a key mismatch between training and inference in existing guidance distillation methods by training on CFG-guided trajectories instead of standard diffusion trajectories. Through extensive experiments, we show that AGD achieves comparable or superior FID to CFG across multiple architectures with only half the NFEs. Notably, our method enables the distillation of large models (sim2.6B parameters) on a single consumer GPU with 24 GB of VRAM, making it more accessible than previous approaches that require multiple high-end GPUs. We will publicly release the implementation of our method.

解读

一句话总结

本文提出了一种名为AGD的轻量级适配器指导蒸馏方法,通过在单个前向传递中模拟无分类器指导(CFG),有效地将CFG的行为集成到模型中,从而将采样速度提高一倍,同时保持或提高样本质量。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源