Diffusion probabilistic models (DPMs) have demonstrated a very promising ability in high-resolution image synthesis. However, sampling from a pre-trained DPM is time-consuming due to the multiple evaluations of the denoising network, making it more and more important to accelerate the sampling of DPMs. Despite recent progress in designing fast samplers, existing methods still cannot generate satisfying images in many applications where fewer steps (e.g., $<$10) are favored. In this paper, we develop a unified corrector (UniC) that can be applied after any existing DPM sampler to increase the order of accuracy without extra model evaluations, and derive a unified predictor (UniP) that supports arbitrary order as a byproduct. Combining UniP and UniC, we propose a unified predictor-corrector framework called UniPC for the fast sampling of DPMs, which has a unified analytical form for any order and can significantly improve the sampling quality over previous methods, especially in extremely few steps. We evaluate our methods through extensive experiments including both unconditional and conditional sampling using pixel-space and latent-space DPMs. Our UniPC can achieve 3.87 FID on CIFAR10 (unconditional) and 7.51 FID on ImageNet 256$\times$256 (conditional) with only 10 function evaluations. Code is available at https://github.com/wl-zhao/UniPC.
翻译:扩散概率模型(DPMs)在高分辨率图像生成方面展现了极具前景的能力。然而,从预训练的DPM中采样由于需要对去噪网络进行多次评估而耗时,因此加速DPM采样变得愈发重要。尽管近期在快速采样器设计方面取得了进展,但在许多偏好较少步数(例如<10)的应用场景中,现有方法仍无法生成令人满意的图像。本文开发了一种统一的校正器(UniC),可应用于任何现有DPM采样器之后,在不增加额外模型评估次数的前提下提高精度阶数,并以此为副产品推导出支持任意阶数的统一预测器(UniP)。结合UniP与UniC,我们提出了一种名为UniPC的统一预测-校正框架,用于DPM的快速采样。该框架具有任意阶数的统一解析形式,能够显著提升采样质量,尤其在极少数步数下优于先前方法。我们通过大规模实验对方法进行了评估,包括使用像素空间和潜在空间DPM进行无条件采样和条件采样。在仅进行10次函数评估的情况下,我们的UniPC在CIFAR10(无条件)上实现了3.87的FID分数,在ImageNet 256×256(条件)上实现了7.51的FID分数。代码已开源至https://github.com/wl-zhao/UniPC。