OYS方法用贝叶斯优化调整扩散模型采样,5步就能达到50步的质量,速度提升10倍,还不需额外训练。
扩散模型采样通常需要多次神经网络前向传播,计算成本高昂。研究提出OYS方法,将时间步选择视为黑盒优化问题,直接使用贝叶斯优化目标指标。该方法在文本生成和图像修复任务上均优于默认采样方案,5步OYS采样可保留50步采样的89%-94%质量,同时降低10倍推理成本。
Optimize Your Sampling: Tuned Diffusion Sampling with Bayesian Optimization
Sampling from a diffusion model typically requires many forward passes through a large neural network, making generation computationally expensive. While much work has focused on efficient solvers and samplers, comparatively little attention has been paid to selecting the sampling timesteps themselves. A recent line of work optimizes theoretically derived surrogates for sample quality rather than the quality metric itself. We propose Optimizing Your Sampling (OYS), which instead treats timestep selection as a black-box optimization problem, optimizing the target metric directly with Bayesian optimization. OYS outperforms both the default schedules and those of Align Your Steps on text-to-image generation, and improves over the default schedules on inpainting and other image tasks, in both quantitative and human evaluations. OYS requires no additional training, is applicable even to distilled models, and improves both simple and sophisticated samplers such as Euler and DPM-Solver++. A 5-step OYS schedule retains 89%-94% of the quality of a 50-step schedule while reducing inference cost by 10x.