How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

Following on from the previous section, we exploredStable DiffusionAfter the basic parameters, today we will continue to learn more advanced parameters in depth, which will help you to control the AI painting process more finely and enhance the picture effect. In this article, we will explain in detail the key knowledge points such as image size settings, HD restoration, multiple image generation, cue word guide factor and random seed.

I. Picture Size Setting

In AI drawing, the setting of image size is crucial, which directly affects the layout and quality of the picture.

  1. Size limitations: When Stable Diffusion generates images, the width and height are recommended to be set between 512 and 768 pixels to keep the structure mostly correct. This is because the image size used by the model during training is 512 pixels by 512 pixels, and going outside of this range may result in a disproportionate or degraded image.
  2. Performance Considerations: Higher resolutions take up more video memory and require a higher level of computer configuration. For example, a computer with 6GB of video memory may experience low video memory when setting the width and height to more than 512 pixels.
  3. compositional relationship: The image size should match the composition. 512x512 is good for close-ups, 512x768 for full-body portraits, and wider ratios such as 768x512 are good for landscape subjects.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

II. High-resolution restoration

In AI painting, high-resolution restoration is a key feature that allows us to generate high-resolution images from lower-resolution images.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

1. Importance of high-resolution restoration

  • Resolution Limit: Stable Diffusion, at its default settings, produces images with limited resolution, which can be unsatisfactory, especially in terms of facial detail and overall sharpness.
  • Enhancing quality: High-resolution restoration improves the clarity and detail of the image by increasing the number of pixels in the image, especially for fine depiction of facial features.

2、High resolution restoration works

  1. Enlarge image: First, the initial low-resolution image is enlarged to a higher size, usually twice or more.
  2. Adding noise: Adds noise to the enlarged image to simulate the noise state of the original low-resolution image.
  3. denoising process: Utilizes the denoising power of Stable Diffusion to produce crisp images from high-resolution images with added noise.
  4. Detail Recovery: Through the process described above, details of the image are restored and enhanced, especially important parts such as the face.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

3. Parameter settings for high-resolution restoration

  1. magnifying power: Set the magnification of the enlarged image, the common settings are2xorthreefold, but can be adjusted as needed.
  2. Amplification algorithm: Choose a suitable algorithm to handle the color assignment of new pixels during the zoom-in process. For cubic images, it is recommended to useR-ESRGAN 4xalgorithm; for quadratic images, it is recommended to useR-ESRGAN 4x+ anime6BAlgorithm.
  3. High score iteration steps: Setup first15 steps.Guaranteed, no need to increase if results are good, generally20 steps.Better results can be obtained around the same time.0then denotes consistency with the number of iteration steps.
  4. Redraw Amplitude: Controls the density of added noise, which affects the degree of modification of the picture. Lower repaints are mainly used for detail fixes, while higher repaints may result in drastic changes to the structure of the picture.
  • - **0.1-0.4: **Basically maintains the structure of the picture, with a gradual increase in detail adjustments .
  • - **0.4-0.8:** The picture is overhauled, but will also refer to the previous composition .
  • - **0.8-0.9: **Basically redrawn, almost nothing to do with the original picture .
  • - **1:** It doesn't matter what the original picture is anymore, redraw it.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

Third, multiple picture generation

In practice, we often need to generate multiple images to choose from.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

  1. Single batch quantity: Generating multiple images at once can improve efficiency, but it will increase the video memory usage. The number of single batches can be adjusted appropriately according to the computer configuration.
  2. Total number of batches: By setting the total number of batches, we can control the total number of images generated. For example, if the number of single batches is 4 and the total number of batches is 3, we can generate 12 images.

IV. Cue word guidance factor

The Cue-Free Guidance Coefficient, Classifier-Free Guidance (CFG value) determines how much the image is influenced by the cue.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

  1. Effectiveness: The higher the CFG value, the harder the screen portrays the cue word. However, too high a CFG value may cause the screen to fall apart, so it is recommended to keep it between 5 and 9. Don't go above 12, the screen will crash.
  2. overfitting problem: If the picture has a problem of over-carving, you can turn down the CFG value appropriately.

How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)

V. Random seeds

The random seed determines the noise distribution of the initial noise map, which in turn determines the randomness of the generated image.

  1. Fixed vs. random: When set to **-1**, the images generated will be different each time. If you need to generate a specific style of image fixedly, you can set a specific random seed value.
  2. parametric testing: Fixing the random seed helps us to accurately observe the changes in the picture when we change other parameters.

VI. Summary

After studying this section, you can try the following exercises:

  • Create a landscape image in landscape and a portrait in portrait.
  • If your computer configuration allows it, try to turn on the HD Repair function to experience its effect on improving the quality of the picture.
  • Try different CFG values and observe how the details of the picture change.
  • Experience the randomness and controllability of the picture by adjusting the random seeds.

This is all we have for today's lesson. We hope that through this article, you will be able to have a deeper understanding of the advanced parameters of Stable Diffusion and apply them to practical creations.

statement:The content of the source of public various media platforms, if the inclusion of the content violates your rights and interests, please contact the mailbox, this site will be the first time to deal with.
TutorialEncyclopedia

How to modify all pictures to the same size? Newbie hackers who don't know PS use Instant Dream AI to modify the size of pictures and keep the style unified

2025-2-15 12:34:46

TutorialEncyclopedia

Public cover image design, use instant dream AI to generate public cover image with title in one click

2025-2-16 12:52:55

Search