Diffusion models show promising generation capability for a variety of data. Despite their high generation quality, the inference for diffusion models is still time-consuming due to the numerous sampling iterations required. To accelerate the inference, we propose ReDi, a simple yet learning-free Retrieval-based Diffusion sampling framework. From a precomputed knowledge base, ReDi retrieves a trajectory similar to the partially generated trajectory at an early stage of generation, skips a large portion of intermediate steps, and continues sampling from a later step in the retrieved trajectory. We theoretically prove that the generation performance of ReDi is guaranteed. Our experiments demonstrate that ReDi improves the model inference efficiency by 2x speedup. Furthermore, ReDi is able to generalize well in zero-shot cross-domain image generation such as image stylization.
翻译:摘要:扩散模型在多种数据生成中展现出优越能力。尽管其生成质量高,但由于需要大量采样迭代,扩散模型的推理过程仍然耗时。为加速推理,我们提出ReDi——一种简单且无需学习的基于检索的扩散采样框架。ReDi从预计算的知识库中,在生成早期阶段检索与部分生成轨迹相似的轨迹,跳过中间大量步骤,并从检索轨迹的后续步骤继续采样。我们从理论上证明了ReDi的生成性能具有保证。实验表明,ReDi将模型推理效率提升2倍。此外,ReDi在图像风格化等零样本跨领域图像生成任务中具有良好的泛化能力。