Sampling method

There are several sampling methods are available in Dreamerland including Euler A, Euler, DDIM, DPM++ 2M Karras, DMP++2M SDE Karras and UniPC

In order to understand what sampling method is, we have to know how Stable Diffusion generate an image from scratch.

To generate an image, Stable Diffusion begins by generating a completely random image in the latent space. Then, the noise predictor estimates the noise within the image, which is subsequently subtracted. This iterative process is repeated multiple times, resulting in a final output of a clean image.

The process to remove noise and generate new images at each step is referred to as sampling. The method used in sampling is called the sampler or sampling method. The sampling method remove noise and generate a cleaner image each step.

What the difference between sampling methods?

They are different mathematic method to predict noise. We will give you a big picture of each one but we won't go into technical here.

Euler A and Euler

A stands for Ancestral. Ancestral sampler will add noise to the image at each step. Therefore the result of Euler A will be more creative. However, Euler A would not converge because noise will be added at each step to introduce randomness.

DDIM

DDIM (Denoising Diffusion Implicit Model) is one of the first samplers designed for diffusion models. DDIM only takes eight steps to achieve incredible images

DPM++

DPM++ trades speed for quality. It normally take more steps than other sampling methods to get high quality images. It’s better suited for highly tuned prompts.

UniPC

UniPC (Unified Predictor-Corrector) Framework for Fast Sampling of Diffusion Models is introduced in 2023 by Wenliang Zhao, Lujia Bai, Yongming Rao, Jie Zhou, Jiwen Lu. it can achieve high-quality image generation in 5-10 steps.

Last updated