Stable Diffusion Samplers - Which samplers are the best and all settings explained!

SiliconThaumaturgy
12 Aug 202317:06

TLDRThis video provides an in-depth analysis of the 22 Samplers available in stable diffusion, focusing on their differences, usage, and optimal settings. The่ฎฒ่งฃ่€… discusses the impact of SDXL, the processing speed of Samplers, their convergence behavior, and the number of steps required for quality output. The video also delves into advanced settings, including the role of Ada and Sigma, and provides recommendations for selecting the best Sampler based on desired outcomes and efficiency.

Takeaways

  • ๐Ÿ“Œ There are 22 Samplers in total, which can be confusing for new users, and this video aims to clarify their differences.
  • ๐Ÿš€ The introduction of SDXL brings changes such as the incompatibility of three Samplers (ddim, plms, udpc) and a change in output quality for Euler a.
  • ๐Ÿ” The first distinction among Samplers is processing speed, divided into fast and slow groups, with DPM adaptive as an outlier.
  • ๐ŸŒ Convergence is a key parameter, determining whether the output image changes substantially with more steps; converging Samplers stabilize their output, while non-converging ones continue to evolve.
  • ๐Ÿ”ข The number of steps required to achieve a decent-looking output varies among Samplers, with most achieving good results within 20 steps.
  • ๐Ÿ“Š A chart is provided to compare the average and maximum steps needed for each Sampler to produce satisfactory results.
  • ๐ŸŽจ The output image quality and characteristics are the most important parameters for Samplers, with three main groups and two outliers identified.
  • ๐ŸŒŸ Euler a is highlighted as the top pick for SD 1.5 due to its fast processing speed and relatively low step requirement.
  • ๐ŸŒ€ Group 3 Samplers with 'sde' in their names produce unique outputs and have a convergence behavior between Group 1 and Group 2.
  • ๐Ÿ› ๏ธ Advanced settings like Ada and sigmas can significantly alter the output, with Ada controlling noise addition and sigma churn affecting image simplicity.
  • ๐Ÿ”„ The scheduler setting impacts the brightness and other visual effects of the output, with different options like Keras, exponential, and polyexponential available.

Q & A

  • What is the main focus of the video?

    -The main focus of the video is to provide a detailed comparison and analysis of different Samplers in stable diffusion, helping viewers understand their differences and choose the best one for their needs.

  • How many Samplers are there in total according to the video?

    -According to the video, there are a total of 22 Samplers in stable diffusion.

  • What are the two important differences when using Samplers with sdxl?

    -The two important differences when using Samplers with sdxl are: 1) Three Samplers - ddim, plms, and udpc - cannot be used with sdxl, and 2) Euler a outputs look foggy and less sharp for sdxl, which is the default sampler for automatic 1111.

  • What does the 'a' in Sampler names signify?

    -The 'a' in Sampler names stands for ancestral, indicating that these Samplers add noise back in during image generation, leading to non-converging outputs that continue to change with more steps.

  • How does processing speed differ among Samplers?

    -Processing speed for Samplers is divided into two groups: fast and slow. Slow Samplers take twice as long per step compared to fast Samplers. DPM adaptive is an outlier with its processing speed depending on the CFG.

  • What is the general recommendation for the number of steps needed to get a decent looking output with most Samplers?

    -Most Samplers consistently get decent results within 20 steps, although some like DPM fast and plms may need more than 30 steps.

  • What are the three main groups of Samplers based on their output similarities?

    -The three main groups of Samplers based on output similarities are: Group 1 with 11 Samplers, Group 2 with five Samplers that are ancestral and add noise back in, and Group 3 with Samplers that have sde in their name and produce unique outputs.

  • What is the role of the ADA parameter in ancestral Samplers?

    -The ADA parameter measures how much noise is added back into the latent image after each step, determining whether the output converges to a particular image or keeps changing. An ADA of zero turns ancestral Samplers into non-converging ones like Group 1, while an ADA of one makes it similar to Group 2 Samplers.

  • What are the unique characteristics of the DPM adaptive Sampler?

    -The DPM adaptive Sampler is unique as it uses CFG instead of steps as its primary variable. Changing CFG adjusts the contrast and saturation of the image. It generally produces good quality outputs but has a long processing time.

  • How does the unipc Sampler differ from others?

    -The unipc (Unified Corrector and Predictor) Sampler is designed for text-to-image tasks and has unique settings like 'order' which impacts the number of steps needed. It also has variants and skip types that can slightly affect the steps required for a good output.

  • What is the impact of Sigma churn and Sigma noise on the output image?

    -Sigma churn simplifies the output image as its value increases, potentially making it look fuzzy. Sigma noise modifies the impact of Sigma churn, with lower values allowing more pronounced effects of Sigma churn without turning the image into a blurry mess.

  • How do the different scheduler options affect the output image?

    -The scheduler options - Keras, exponential, and polyexponential - affect how the image progresses over the steps. For 'care' Samplers, setting the scheduler to Keras yields the same results as the Keras version. The non-'care' Samplers behave similarly to exponential and polyexponential but not exactly the same. The maximum Sigma acts as a brightness slider, while the impact of 'rho' depends on the scheduler used.

Outlines

00:00

๐Ÿ” Introduction to Samplers in Stable Diffusion

This paragraph introduces the topic of Samplers in Stable Diffusion, highlighting the complexity and variety of 22 different Samplers that can be overwhelming for new users. The speaker, Silicon Thomaturgy, aims to clarify the differences between Samplers and help viewers choose the best one for their needs. It mentions that this video will cover three new Samplers and changes with the SDXL version, as well as explain complex concepts like Ada and Sigma Churn. The paragraph also mentions the availability of bookmarks for easy navigation and begins discussing the SDXL development, noting two key differences: the incompatibility of three Samplers with SDXL and the foggy output of Euler A, the default sampler for automatic 1111.

05:01

๐Ÿ“Š Comparison and Characteristics of Samplers

The speaker delves into the comparison of Samplers based on processing speed, convergence, and the number of steps required for a decent output. It distinguishes between fast and slow Samplers, with DPM Adaptive being an outlier. The paragraph explains the concept of converging and non-converging Samplers, with the latter adding noise back into the latent image during generation. It also discusses the average and maximum steps needed for good results and provides a chart for reference. The speaker emphasizes that while certain Samplers may require fewer steps, adjusting for processing speed is crucial for a fair comparison. The paragraph concludes with a discussion on the output image quality and the formation of three main groups of Samplers with two outliers.

10:02

๐ŸŒŸ In-Depth Analysis of Sampler Groups

This paragraph provides an in-depth analysis of the three main groups of Samplers, discussing their unique characteristics and performance. Group 1, the largest, is evaluated based on processing speed and step requirements, with some Samplers like DPM2 and LMS being slower or requiring more steps. The speaker suggests trying out different Samplers from this group. Group 2 Samplers, identified by a lowercase 'a', are non-converging and add noise during generation. Euler A is highlighted as the top pick for SD 1.5, while for SDXL, DPM Plus 2sa or DPM plus plus 2sa Keras are recommended. Group 3 includes Samplers with 'sde' in their name, offering unique outputs and a convergence level between Groups 1 and 2. The paragraph also discusses the two new Samplers added to Group 3, their processing speed, and output quality. The paragraph concludes with a discussion on the outlier Samplers, DPM adaptive and DPM fast, detailing their unique aspects and performance limitations.

15:04

๐Ÿ› ๏ธ Advanced Settings and Configurations

The final paragraph focuses on advanced settings and configurations for Samplers, starting with an explanation of Ada and its effect on noise addition to the latent image. The speaker provides examples of how changing Ada affects the output of ancestral Samplers and DDIM. It then discusses the unique settings for the unipc Sampler, emphasizing the importance of the 'order' variable and the impact of different variants and skip types. The paragraph also covers Sigma variables, highlighting the impact of Sigma Churn and Sigma Noise, and provides recommendations for their use. Finally, the speaker talks about the scheduler settings and their effects on different Samplers, including the implications of minimum and maximum Sigma values and the influence of the row parameter depending on the scheduler used. The paragraph concludes with a summary of the advanced settings and their implications for image generation.

Mindmap

Keywords

๐Ÿ’กSamplers

Samplers in the context of the video refer to different algorithms or methods used in the process of generating images through stable diffusion. They are crucial for determining the quality and characteristics of the output images. The video discusses various Samplers, their processing speeds, convergence properties, and how they affect the final image generation.

๐Ÿ’กStaple Diffusion

Staple Diffusion is likely a reference to a specific implementation or version of diffusion models used in image generation. The video aims to provide a deep dive into understanding the various Samplers within this context, which suggests that it is a significant aspect of the technology being discussed.

๐Ÿ’กSDXL

SDXL appears to be a specific variant or mode within the context of the video, possibly related to the settings or configurations used in the image generation process. It is mentioned as having certain limitations and differences compared to the standard diffusion process.

๐Ÿ’กProcessing Speed

Processing Speed refers to the computational efficiency of the Samplers. It is a measure of how quickly a Sampler can execute a single step in the image generation process. Faster Samplers are generally preferred as they require less time to produce results.

๐Ÿ’กConvergence

Convergence in the context of the video describes the point at which the output image from the Samplers stabilizes and no longer changes significantly with additional steps. Some Samplers converge quickly, while others continue to alter the image with each step.

๐Ÿ’กSteps

Steps refer to the number of iterations or stages in the image generation process. Different Samplers require a varying number of steps to produce a high-quality image, with some needing more steps than others to achieve satisfactory results.

๐Ÿ’กOutput Image

The Output Image is the final result produced by the Samplers after the image generation process. It is the ultimate่กก้‡ๆ ‡ๅ‡† by which Samplers are judged, as it represents the visual outcome of the diffusion process.

๐Ÿ’กAdaptive

Adaptive in this context refers to a Sampler that adjusts its parameters based on the CFG (Contrast and Saturation) settings rather than a fixed number of steps. This allows for a dynamic approach to image generation that can potentially produce varied results.

๐Ÿ’กSigma Churn

Sigma Churn is an advanced setting that affects the complexity and detail of the output image. Increasing Sigma Churn simplifies the image, potentially making it look fuzzier, while decreasing it can lead to more detailed and complex images.

๐Ÿ’กScheduler

Scheduler refers to the algorithm or method used to adjust the learning rate or certain parameters over time during the image generation process. It can have different settings like Keras, exponential, and polyexponential, each affecting the image generation process in unique ways.

Highlights

There are 22 Samplers in total, which can be confusing for new users.

SDXL has two important differences: three Samplers (ddim, plms, udpc) cannot be used with it, and Euler a outputs look foggy and less sharp.

Euler a is the default sampler for automatic 1111, and its outputs are less sharp with SDXL.

Processing speed for Samplers is divided into two groups: fast and slow, with DPM adaptive as an outlier.

Converging Samplers do not change much once they reach a particular output, while non-converging Samplers continually change as more steps are used.

DPM adaptive does not use steps, so convergence is not applicable to it.

The number of steps needed to get a decent-looking output varies among Samplers, with some requiring more than 30 steps.

SDXL requires slightly fewer steps to get a good result compared to other Samplers, but Hume is an exception requiring more steps.

Group 1 is the largest group, containing 11 of the 22 Samplers, and most converge in less than 20 steps.

Group 2 Samplers all have a lowercase 'a' in their name, indicating they add noise back in during generation and do not converge.

Group 3 includes Samplers with 'sde' in their name and produces unique outputs compared to other groups.

DPM adaptive is unique as it uses CFG instead of steps, and its processing time is very long.

DPM fast is sensitive to CFG and needs more than 30 steps to get decent results, making it less preferable.

Ancestral Samplers have an ADA of one, while ddim has an ETA of zero, affecting how noise is added back into the latent image.

Sigma churn and Sigma noise are advanced settings that affect the simplicity and sharpness of the output image.

The scheduler has three options: Keras, exponential, and polyexponential, with different impacts on the output depending on the Sampler.

Minimum and maximum Sigma settings affect the sharpness and brightness of the images, with higher maximum Sigma resulting in darker images.

The impact of the scheduler's 'rho' setting varies depending on the type of scheduler used, with polyexponential being very sensitive to it.