{"id":28527,"date":"2025-02-16T09:26:22","date_gmt":"2025-02-16T01:26:22","guid":{"rendered":"https:\/\/www.1ai.net\/?p=28527"},"modified":"2025-02-11T21:31:27","modified_gmt":"2025-02-11T13:31:27","slug":"stable-diffusion%e6%80%8e%e4%b9%88%e7%94%a8%ef%bc%9fstable-diffusion%e6%96%87%e7%94%9f%e5%9b%be%e9%ab%98%e7%ba%a7%e5%8f%82%e6%95%b0%e4%bb%8b%e7%bb%8d%ef%bc%88%e4%b8%8b%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/28527.html","title":{"rendered":"How to use Stable Diffusion, an introduction to the advanced parameters of the Stable Diffusion Venn diagram (below)"},"content":{"rendered":"<p>Following on from the previous section, we explored<a href=\"https:\/\/www.1ai.net\/en\/tag\/stable-diffusion\" title=\"_Other Organiser\" target=\"_blank\" >Stable Diffusion<\/a>After 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.<\/p>\n<p>I. Picture Size Setting<\/p>\n<p>In AI drawing, the setting of image size is crucial, which directly affects the layout and quality of the picture.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28528\" title=\"483c46b0j00sritcz001rd000qs00bxm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/483c46b0j00sritcz001rd000qs00bxm.jpg\" alt=\"483c46b0j00sritcz001rd000qs00bxm\" width=\"964\" height=\"429\" \/><\/p>\n<ol>\n<li><strong>Size limitations<\/strong>: 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.<\/li>\n<li><strong>Performance Considerations<\/strong>: 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.<\/li>\n<li><strong>compositional relationship<\/strong>: The size of the picture should match the structure. 512 x 512 fit for close-up, 512 x 768 fit for whole body image, and a wider ratio like 768 x 512 fit for viewing\u3002<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28529\" title=\"a1803b06j00sritd100tad000u000k0m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/a1803b06j00sritd100tad000u000k0m.jpg\" alt=\"a1803b06j00sritd100tad000u000k0m\" width=\"1080\" height=\"720\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28531\" title=\"07675a1cj00sritd401tjd000sg017km\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/07675a1cj00sritd401tjd000sg017km.jpg\" alt=\"07675a1cj00sritd401tjd000sg017km\" width=\"1024\" height=\"1568\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28530\" title=\"4a2f7bd9j00sritd201d2d000sg00sgm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/4a2f7bd9j00sritd201d2d000sg00sgm.jpg\" alt=\"4a2f7bd9j00sritd201d2d000sg00sgm\" width=\"1024\" height=\"1024\" \/><\/p>\n<p>II. High-resolution restoration<\/p>\n<p>In AI painting, high-resolution restoration is a key feature that allows us to generate high-resolution images from lower-resolution images.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28532\" title=\"ba607caej00sritcy000qd000pi004sm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/ba607caej00sritcy000qd000pi004sm.jpg\" alt=\"ba607caej00sritcy000qd000pi004sm\" width=\"918\" height=\"172\" \/><\/p>\n<p>1. Importance of high-resolution restoration<\/p>\n<ul>\n<li><strong>Resolution Limit<\/strong>: Stable Diffusion, at its default settings, produces images with limited resolution, which can be unsatisfactory, especially in terms of facial detail and overall sharpness.<\/li>\n<li><strong>Enhancing quality<\/strong>: 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.<\/li>\n<\/ul>\n<p>2\u3001High resolution restoration works<\/p>\n<ol>\n<li><strong>Enlarge image<\/strong>: First, the initial low-resolution image is enlarged to a higher size, usually twice or more.<\/li>\n<li><strong>Adding noise<\/strong>: Adds noise to the enlarged image to simulate the noise state of the original low-resolution image.<\/li>\n<li><strong>denoising process<\/strong>: Utilizes the denoising power of Stable Diffusion to produce crisp images from high-resolution images with added noise.<\/li>\n<li><strong>Detail Recovery<\/strong>: Through the process described above, details of the image are restored and enhanced, especially important parts such as the face.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28533\" title=\"8ab82b93j00sritcz008id000u0008cm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/8ab82b93j00sritcz008id000u0008cm.jpg\" alt=\"8ab82b93j00sritcz008id000u0008cm\" width=\"1080\" height=\"300\" \/><\/p>\n<p>3. Parameter settings for high-resolution restoration<\/p>\n<ol>\n<li><strong>magnifying power<\/strong>: Set the magnification of the enlarged image, the common settings are<strong>2x<\/strong>or<strong>threefold<\/strong>, but can be adjusted as needed.<\/li>\n<li><strong>Amplification algorithm<\/strong>: Choose a suitable algorithm to handle the color assignment of new pixels during the zoom-in process. For cubic images, it is recommended to use<strong>R-ESRGAN 4x<\/strong>algorithm; for quadratic images, it is recommended to use<strong>R-ESRGAN 4x+ anime6B<\/strong>Algorithm.<\/li>\n<li><strong>High score iteration steps<\/strong>: Setup first<strong>15 steps.<\/strong>Guaranteed, no need to increase if results are good, generally<strong>20 steps.<\/strong>Better results can be obtained around the same time.<strong>0<\/strong>then denotes consistency with the number of iteration steps.<\/li>\n<li><strong>Redraw Amplitude<\/strong>: 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.<\/li>\n<\/ol>\n<ul>\n<li>- **0.1-0.4: **Basically maintains the structure of the picture, with a gradual increase in detail adjustments .<\/li>\n<li>- **0.4-0.8:** The picture is overhauled, but will also refer to the previous composition .<\/li>\n<li>- **0.8-0.9: **Basically redrawn, almost nothing to do with the original picture .<\/li>\n<li>- **1:** It doesn't matter what the original picture is anymore, redraw it.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28534\" title=\"8b9e3bd6p00sritd0006xd000u00044m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/8b9e3bd6p00sritd0006xd000u00044m.png\" alt=\"8b9e3bd6p00sritd0006xd000u00044m\" width=\"1080\" height=\"148\" \/><\/p>\n<p>Third, multiple picture generation<\/p>\n<p>In practice, we often need to generate multiple images to choose from.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28535\" title=\"6a204574j00sritcz000ud000r6006xm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/6a204574j00sritcz000ud000r6006xm.jpg\" alt=\"6a204574j00sritcz000ud000r6006xm\" width=\"978\" height=\"249\" \/><\/p>\n<ol>\n<li><strong>Single batch quantity<\/strong>: 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.<\/li>\n<li><strong>Total number of batches<\/strong>: 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.<\/li>\n<\/ol>\n<p>IV. Cue word guidance factor<\/p>\n<p>The Cue-Free Guidance Coefficient, Classifier-Free Guidance (CFG value) determines how much the image is influenced by the cue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28536\" title=\"95ee70ecp00sritcy0002d000ps001nm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/95ee70ecp00sritcy0002d000ps001nm.png\" alt=\"95ee70ecp00sritcy0002d000ps001nm\" width=\"928\" height=\"59\" \/><\/p>\n<ol>\n<li><strong>Effectiveness<\/strong>: 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.<\/li>\n<li><strong>overfitting problem<\/strong>: If the picture has a problem of over-carving, you can turn down the CFG value appropriately.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28537\" title=\"6cc16f8fp00sritcz002od000u00015m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/6cc16f8fp00sritcz002od000u00015m.png\" alt=\"6cc16f8fp00sritcz002od000u00015m\" width=\"1080\" height=\"41\" \/><\/p>\n<p>V. Random seeds<\/p>\n<p>The random seed determines the noise distribution of the initial noise map, which in turn determines the randomness of the generated image.<\/p>\n<ol>\n<li><strong>Fixed vs. random<\/strong>: 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.<\/li>\n<li><strong>parametric testing<\/strong>: Fixing the random seed helps us to accurately observe the changes in the picture when we change other parameters.<\/li>\n<\/ol>\n<p>VI. Summary<\/p>\n<p>After studying this section, you can try the following exercises:<\/p>\n<ul>\n<li>Create a landscape image in landscape and a portrait in portrait.<\/li>\n<li>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.<\/li>\n<li>Try different CFG values and observe how the details of the picture change.<\/li>\n<li>Experience the randomness and controllability of the picture by adjusting the random seeds.<\/li>\n<\/ul>\n<p>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.<\/p>","protected":false},"excerpt":{"rendered":"<p>Following the previous section, we explored the basic parameters of Stable Diffusion, today we will continue to delve into more advanced parameters that will help you to control the AI painting process more finely and enhance the picture results. In this article, we will explain in detail the size of the picture settings, high-definition repair, multi-picture generation, cue words to guide the coefficient and random seeds and other key knowledge points. First, the picture size settings In AI painting, the picture size settings are critical, which directly affects the layout and quality of the screen. Size Limit: Stable Diffusion When generating pictures, the width and height are recommended to be set between 512 and 768 pixels to keep the structure basically correct. This is because the image size used by the model during training is 512 pixels times 51<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[2328,197,198],"collection":[262],"class_list":{"0":"post-28527","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-ai","9":"tag-stable-diffusion","11":"collection-stablediffusion"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/28527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=28527"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/28527\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=28527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=28527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=28527"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=28527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}