Stable Diffusion is an image generator based on the diffusion model, which has the following parameters:
sampling steps: The number of sampling steps, which determines the number of steps taken by the algorithm to generate the image. Increasing the number of sampling steps results in a smaller, more accurate image of the target, but it also increases the time it takes to generate the image.
ETA: Noise level, which controls how blurry the resulting image is. A higher ETA value results in a more blurry image, while a lower ETA value results in a sharper image.
sigma: Noise distribution, which controls the noise distribution of the generated image. A larger sigma value results in a more uniform distribution of image noise, while a smaller sigma value results in a more concentrated distribution of generated image noise.
seed: A random seed that controls the randomness of the generated image. Different seed values generate different images.
prompt: A text prompt that controls the content of the generated image. Different prompt values produce different images.
Stable Diffusion supports the following samplers:
Euler: Euler sampler is a classic sampler with high stability.
dDIMs: The DDIM sampler, is an improved Euler sampler with higher efficiency.
DPM2: DPM2 sampler, is a faster sampler, but may produce some aliasing.
DPM++:d PM++ sampler, is a faster sampler with higher quality.
The sampling steps parameter controls the number of steps taken by the algorithm to generate the image. Increasing the number of sampling steps results in a smaller, more accurate image of the target, but it also increases the time it takes to generate the image.
The ETA parameter controls how blurry the resulting image is. A higher ETA value results in a more blurry image, while a lower ETA value results in a sharper image.
The sigma parameter controls the noise distribution of the generated image. A larger sigma value results in a more uniform distribution of image noise, while a smaller sigma value results in a more concentrated distribution of generated image noise.
The seed parameter controls the randomness of the generated image. Different seed values generate different images.
The prompt parameter controls the content of the generated image. Different prompt values produce different images.
The Euler sampler is a classic sampler with high stability. It produces images by iteratively reducing noise at each step.
The DDIM sampler is an improved Euler sampler with higher efficiency. It generates an image by iteratively updating the noise distribution with each step.
The DPM2 sampler is a faster sampler but can produce some aliasing. It generates images by iteratively updating the noise distribution and image content with each step.
The DPM++ sampler is a faster sampler with higher quality. It generates images by iteratively updating the noise distribution, image content, and edges at each step.
In practical use, you can adjust these parameters according to your needs to generate images in different styles.
In Stable Diffusion, a sampler is an algorithm used to generate an image. The sampler needs to generate an image from noise, which can be understood as a random variable that represents the uncertainty in the image.
The louder the noise of the sampler, the blurrier the resulting image will be. This is because noise causes the pixel values in the image to change, which reduces the clarity of the image.
The less noise the sampler is, the sharper the image will be. This is because noise causes the pixel values in the image to change less, which improves the clarity of the image.
In practical use, you can adjust the noise level of the sampler as needed to produce different styles of images. For example, if you want to produce a blurry abstract image, you can use loud noise;If you want to produce a clear, realistic image, you can use less noise.
Let's say we want to draw a picture with a blank piece of paper. If we draw directly on a blank piece of paper, then the drawn image will be very clear. However, if we sprinkle some sand on a blank piece of paper and then draw on it, the drawn image will become blurry. This is because the sand obscures part of the white paper, which reduces the sharpness of the image.
The noise in the sampler is like sand sprinkled on a blank sheet of paper, which reduces the clarity of the image.