> For the complete documentation index, see [llms.txt](https://docs.dreamerland.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dreamerland.ai/basic-terms/sampling-method.md).

# 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

<figure><img src="/files/irbwJMbSKaBqjk4jorZy" alt="" width="375"><figcaption></figcaption></figure>

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.&#x20;

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.&#x20;

<figure><img src="/files/mH0fCXuy35jdaLPvKXVq" alt="" width="256"><figcaption><p>Sampling process step by step</p></figcaption></figure>

**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.

<figure><img src="/files/6ltJCGho15xuU50jYFXI" alt="" width="256"><figcaption><p>Euler</p></figcaption></figure>

<figure><img src="/files/imuPaoTTrAsx8vWgmD7Q" alt="" width="256"><figcaption><p>Euler A</p></figcaption></figure>

**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**&#x20;

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**.
