{"id":15148,"date":"2024-07-09T09:44:18","date_gmt":"2024-07-09T01:44:18","guid":{"rendered":"https:\/\/www.1ai.net\/?p=15148"},"modified":"2024-07-09T09:44:18","modified_gmt":"2024-07-09T01:44:18","slug":"stable-diffusion-%e6%96%b0%e6%89%8b%e5%ad%a6%e4%b9%a0%e5%85%a5%e9%97%a8%e6%8c%87%e5%8d%97%ef%bc%8c%e5%9b%be%e7%94%9f%e5%9b%be%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/15148.html","title":{"rendered":"Stable Diffusion beginner&#039;s guide, basic operation tutorial of image generation"},"content":{"rendered":"<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84\" data-pm-slice=\"0 0 []\">Stable Diffusion Quick Start: Image-to-Image<\/h1>\n<p data-track=\"85\">This article is<a href=\"https:\/\/www.1ai.net\/en\/tag\/stable-diffusion\" title=\"_Other Organiser\" target=\"_blank\" >Stable Diffusion<\/a><a href=\"https:\/\/www.1ai.net\/en\/tag\/%e5%88%9d%e5%ad%a6%e8%80%85\" title=\"[Sees articles with tags]\" target=\"_blank\" >beginner<\/a>A detailed tutorial on how to generate images from text is provided to guide you on how to use the text-to-image function and start your AI art creation journey.<\/p>\n<p data-track=\"86\">Compared with the raw images in Midjourney, the raw images in Stable Diffusion are much more powerful. In addition to image control, they also include graffiti, partial redrawing, graffiti redrawing, uploading redraw masks, and batch processing.<\/p>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"87\">1. Introduction to the image generation interface<\/h1>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15149\" title=\"get-294\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-294.jpg\" alt=\"get-294\" width=\"614\" height=\"310\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15150\" title=\"get-295\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-295.jpg\" alt=\"get-295\" width=\"1228\" height=\"620\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15151\" title=\"get-296\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-296.jpg\" alt=\"get-296\" width=\"1228\" height=\"620\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"88\">2. First experience with image generation<\/h1>\n<p data-track=\"89\">We can upload our pictures in the picture material area, select the large model we like, and only provide some text descriptions without setting the picture raw image parameters. It is easy to get a comic style picture with a posture similar to the original picture. This is the simplest use of the picture raw image.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15153\" title=\"get-298\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-298.jpg\" alt=\"get-298\" width=\"1228\" height=\"620\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"90\">3. Detailed explanation of image generation parameters<\/h1>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"91\">(I) Zoom mode<\/h1>\n<p data-track=\"92\">The scaling mode function actually refers to the way in which the images in the material area are loaded. Each loading method will affect the output image size result.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15152\" title=\"get-297\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-297.jpg\" alt=\"get-297\" width=\"614\" height=\"239\" \/><\/div>\n<p data-track=\"93\">The four image processing methods are explained as follows:<\/p>\n<p data-track=\"94\">Just Resize<\/p>\n<p data-track=\"95\">o Force-scale the image to the size you want. Unless the height and width match, you will get an incorrect aspect ratio.<\/p>\n<p data-track=\"96\">Crop and Resize<\/p>\n<p data-track=\"97\">o Crop the image to your desired ratio so that the entire target resolution is filled by the image and the excess is cropped.<\/p>\n<p data-track=\"98\">Resize and Fill<\/p>\n<p data-track=\"99\">o Fill the newly sized element based on the last pixel of the image. Scale the image proportionally and fill in the missing parts.<\/p>\n<p data-track=\"100\">Latent upScale<\/p>\n<p data-track=\"101\">o Similar to stretching, but with high randomness when collecting noise. This is a shortcut option often used for image super-resolution, use with caution on low video memory.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15154\" title=\"get-299\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-299.jpg\" alt=\"get-299\" width=\"1228\" height=\"306\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"102\">(II) Redrawing intensity (the core of the image generation)<\/h1>\n<p data-track=\"103\">Determines how much the algorithm affects the image content. Range is 0-1.<\/p>\n<p data-track=\"104\">The larger the value of this parameter is, the greater the difference with the original image is; the smaller the value is, the closer it is to the original image.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15155\" title=\"get-300\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-300.jpg\" alt=\"get-300\" width=\"589\" height=\"437\" \/><\/div>\n<p data-track=\"105\">We can intuitively feel the impact of the redrawing intensity on the original image through a set of pictures: the lower the redrawing intensity, the more similar the generated image is to the original image. The higher the redrawing intensity, the more different the generated image is from the original image.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15157\" title=\"get-302\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-302.jpg\" alt=\"get-302\" width=\"614\" height=\"216\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"106\">(III) Redraw size<\/h1>\n<p data-track=\"107\">Click the triangle ruler to automatically adjust it to the same size as the material image<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15156\" title=\"get-301\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-301.jpg\" alt=\"get-301\" width=\"614\" height=\"104\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"108\">(IV) Sampling steps<\/h1>\n<p data-track=\"109\">It is basically the same as the Vincent diagram. It is worth noting that by default, when the redraw intensity is low, the actual number of sampling steps will decrease. The specific formula is sampling steps * redraw intensity = actual sampling steps.<\/p>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"110\">4. Graffiti Usage<\/h1>\n<p data-track=\"111\">The parameters are the same as the original image. The difference is that there is an additional brush on the right side of the source image.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15158\" title=\"get-303\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-303.jpg\" alt=\"get-303\" width=\"1228\" height=\"1016\" \/><\/div>\n<p data-track=\"112\">We can select the brush to draw a circle on the girl&#039;s head and add the text description: flower. The graffiti function changes the area we draw into a flower.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15159\" title=\"get-304\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-304.jpg\" alt=\"get-304\" width=\"614\" height=\"310\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15160\" title=\"get-305\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-305.jpg\" alt=\"get-305\" width=\"614\" height=\"310\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15161\" title=\"get-306\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-306.jpg\" alt=\"get-306\" width=\"614\" height=\"262\" \/><\/div>\n<p data-track=\"113\">It can be seen that the graffiti function is quite powerful. In fact, graffiti is very suitable for simple drawings combined with text prompts to realize your own ideas:<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15162\" title=\"get-307\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-307.jpg\" alt=\"get-307\" width=\"614\" height=\"310\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"114\">5. Partial redraw: only change the part of the image you want to change (strong controllability)<\/h1>\n<p data-track=\"115\">You can see that this function has some more parameters:<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15163\" title=\"get-308\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-308.jpg\" alt=\"get-308\" width=\"614\" height=\"222\" \/><\/div>\n<p data-track=\"116\">1. <strong>Mask Fuzziness<\/strong>: Add a Gaussian blur to your masked area<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15164\" title=\"get-309\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-309.jpg\" alt=\"get-309\" width=\"1228\" height=\"492\" \/><\/div>\n<p data-track=\"117\">If it is too low, you can see that the color is very hard.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15165\" title=\"get-310\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-310.jpg\" alt=\"get-310\" width=\"614\" height=\"322\" \/><\/div>\n<p data-track=\"118\">If it is too high, you will find that the effect is not visible<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15166\" title=\"get-311\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-311.jpg\" alt=\"get-311\" width=\"614\" height=\"300\" \/><\/div>\n<p data-track=\"119\">Therefore, this parameter requires you to debug several times during use.<\/p>\n<p data-track=\"120\">2. <strong>Mask Mode<\/strong><\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15167\" title=\"get-312\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-312.jpg\" alt=\"get-312\" width=\"1228\" height=\"488\" \/><\/div>\n<p data-track=\"121\">Redraw the mask content: This means that AI only changes your mask content and keeps everything else.<\/p>\n<p data-track=\"122\">From the effect of the figure below, you can see that only the mask area is redrawn<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15168\" title=\"get-313\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-313.jpg\" alt=\"get-313\" width=\"614\" height=\"310\" \/><\/div>\n<p data-track=\"123\">Redraw non-masked content: This means that AI only changes the unmasked content and retains the masked content<\/p>\n<p data-track=\"124\">The effect in the picture below shows that the clothes remain unchanged, but other parts have been redrawn.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15169\" title=\"get-314\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-314.jpg\" alt=\"get-314\" width=\"614\" height=\"310\" \/><\/div>\n<p data-track=\"125\">3. <strong>Mask area content processing<\/strong><\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15170\" title=\"get-315\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-315.jpg\" alt=\"get-315\" width=\"1228\" height=\"488\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15172\" title=\"get-317\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-317.jpg\" alt=\"get-317\" width=\"686\" height=\"792\" \/><\/div>\n<p data-track=\"126\">4. <strong>Redraw area<\/strong><\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15171\" title=\"get-316\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-316.jpg\" alt=\"get-316\" width=\"1228\" height=\"492\" \/><\/div>\n<p data-track=\"127\">Whole image: Pixels are concentrated in the whole image, and the pixel accuracy of the masked area will be less.<\/p>\n<p data-track=\"128\">Mask area only: Pixels are concentrated only in the mask area, and the pixel accuracy in the mask area will be very high<\/p>\n<p data-track=\"129\">In actual experience, the difference is not that big, so just use the default.<\/p>\n<p data-track=\"130\">5. <strong>Only reserve pixels at the bottom edge of the mask area<\/strong><\/p>\n<p data-track=\"131\">Let the mask refer to the values of the surrounding pixels<\/p>\n<p data-track=\"132\">The lower the value: the fewer elements are near the reference mask.<\/p>\n<p data-track=\"133\">The higher the value: the more elements near the reference mask<\/p>\n<p data-track=\"134\">This setting is the default.<\/p>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"135\">6. Graffiti Redraw (combination of the first two functions)<\/h1>\n<p data-track=\"136\">It is to increase the transparency of the mask based on local redrawing<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15173\" title=\"get-318\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-318.jpg\" alt=\"get-318\" width=\"1228\" height=\"488\" \/><\/div>\n<p data-track=\"137\"><strong>Mask transparency<\/strong>:<\/p>\n<p data-track=\"138\">The higher the value, the more transparent the mask is and the blurrier the image is.<\/p>\n<p data-track=\"139\">The lower the value, the clearer the mask and the more accurate the output image.<\/p>\n<p data-track=\"140\"><strong>Advantages of partial drawing graffiti mask<\/strong>:<\/p>\n<p data-track=\"141\">\u00b7 With masking function<\/p>\n<p data-track=\"142\">The brush color determines the color of the image.<\/p>\n<p data-track=\"143\">\u00b7 You can use multiple colors when graffiti<\/p>\n<p data-track=\"144\">From the effect, we can see that this function can not only identify the mask but also redraw the color of the brush.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15175\" title=\"get-320\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-320.jpg\" alt=\"get-320\" width=\"614\" height=\"310\" \/><\/div>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"145\">7. Upload the redraw mask<\/h1>\n<p data-track=\"146\">Let\u2019s prepare a mask first.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15174\" title=\"get-319\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-319.jpg\" alt=\"get-319\" width=\"194\" height=\"194\" \/><\/div>\n<p data-track=\"147\">Import the mask and modify the prompt words: 1girl, pretty. Select Redraw Mask Contents and you can see that only the white mask area has been changed.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15176\" title=\"get-321\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-321.jpg\" alt=\"get-321\" width=\"1228\" height=\"620\" \/><\/div>\n<p data-track=\"148\">If you choose to redraw the non-masked content, change the prompt word: sea. It can be seen that only the scene outside the mask is redrawn, and the characters are not changed.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15177\" title=\"get-322\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/07\/get-322.jpg\" alt=\"get-322\" width=\"1228\" height=\"620\" \/><\/div>\n<p data-track=\"149\">The above is the upload redraw mask function, which is often used when changing models&#039; clothes.<\/p>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"150\">8. Batch Upload<\/h1>\n<p data-track=\"151\">Process images in a directory on the server host Export images to an empty directory instead of the output directory specified in the settings Add a redraw mask directory to enable the redraw mask feature<\/p>\n<p data-track=\"152\">You need to prepare 2-3 documents:<\/p>\n<p data-track=\"153\">\u00b7 Input folder (all the pictures you want to modify are placed in this folder)<\/p>\n<p data-track=\"154\">Output folder (must be an empty folder)<\/p>\n<p data-track=\"155\">Mask file for sale (if there is a mask, this folder is needed)<\/p>\n<p data-track=\"156\">Batch redrawing can be achieved.<\/p>\n<h1 class=\"pgc-h-arrow-right\" spellcheck=\"false\" data-track=\"157\">IX. Conclusion<\/h1>\n<p data-track=\"158\">In today&#039;s article, I introduced the role of image redrawing in Stable Diffusion, the functional analysis of various tools and parameters, and the learning ideas about image redrawing. Compared with the one-step formation of text-generated images, image-generated images are more fragmented, and we need to constantly modify and adjust local details to get the pictures we want.<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Stable Diffusion Quick Start: Diagram Generation This article provides a detailed diagram generation tutorial for Stable Diffusion beginners, guiding you how to use the text to generate image function to start the journey of AI art creation. Compared to Midjourney's Tuple, the Tuple in Stable Diffusion is much more powerful, in addition to controlling the map also includes graffiti, partial redraw, graffiti redraw, upload redraw mask, batch processing . We can upload our pictures in the picture material area, choose the big model we like, and only provide some textual descriptions without setting the graphic parameters, it is easy to get a comic with almost the same posture as the original picture.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[491,197,198,3408,3407,2894],"collection":[262],"class_list":{"0":"post-15148","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":"tag-3408","12":"tag-3407","13":"tag-2894","14":"collection-stablediffusion"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/15148","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=15148"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/15148\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=15148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=15148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=15148"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=15148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}