sampler
or sampling method
.
Sampling is just one part of the Stable Diffusion model. Read the article “How Does Stable Diffusion Work?” if you want to understand the entire model.
Below is a sampling process in action. The sampler gradually produces cleaner and cleaner images.
Euler, DDIM, PLMS, LMS Karras and HeunFirst, let’s look at Euler, DDIM, PLMS, LMS Karras, and Heun as a group since they represent old-school ODE solvers or original diffusion solvers. DDIM converges at about the same number of steps as Euler but with more variations due to the injection of random noise during its sampling steps.
Ancestral SamplersIf a stable, reproducible image is your goal, you should avoid using ancestral samplers, as they all fail to converge.
DPM and DPM2DPM fast did not converge well. DPM2 and DPM2 Karras performs better than Euler but again in the expense of being two times slower. DPM adaptive performs deceptively well because it uses its own adaptive sampling steps. It can be very slow.
DPM++ solversDPM++ SDE and DPM++ SDE Karras suffer the same shortcoming as ancestral samplers. They not only don’t converge, but the images also fluctuate significantly as the number of steps changes. DPM++ 2M and DPM++ 2M Karras perform well. The Karras variant converges faster when the number of steps is high enough.
UniPCUniPC converges a bit slower than Euler, but not too bad.