Stable Diffusion - Sampler - Zhihu Sampler : Stable Diffusion's webUI provides a large number of samplers for us to choose from, such as Eular a, Heum, DDIM, etc. What are the differences between different samplers? In operation How to choose? This article will explain in detail how the sampler works, and various sampling... https://zhuanlan.zhihu.com/p/621083328 https://github.com/huggingface/diffusers/issues /1633 https://github.com/huggingface/diffusers/issues/1633
There are currently 30 samplers in stable-diffusion-webui 1.6. In principle, most of them are based on DDPM. Based on the basic paradigm of the diffusion model, the noise addition and denoising process can be basically divided into three major categories in terms of application. The first is the early old-school samplers, the second is the DPM algorithm released in 2022, and the third is the new sampler in 2023.
In the first category, DDIM and PLMS were proposed with the first version of sd and are outdated. Euler, Heun, and LMS are all classic ODE solvers. Heun is improved from Euler and is twice as slow. LMS is a linear polynomial solver. Footwork, just keep Euler/a. The samplers with a in them are all ancestor samplers, and the generated graphs are not convergent. This type of ancestor samplers will add noise in each sampling step. As the number of sampling steps increases, the picture will become more or less different. There are some changes and there is no convergence. On the contrary, a sampler that can converge will tend to a fixed picture as the number of sampling steps increases. The advantage of not converging is that it brings certain random details to the picture.
The above is the DPM algorithm that can be retained. The DPM generation algorithm is not used, and the DPM2 sampler is not recommended. The quality may be better, but the rendering time will be doubled. DPM++ is an improvement of the first generation algorithm. Compared with the original algorithm, the one with karras is better. After 8 steps of sampling, the noise will be much less, better images can be produced with fewer sampling steps, and the speed of adding heun will be very slow. s represents single step, 2m represents 2-order multi-step sampling, and 2m is an upgraded version of 2s.