{"id":8272,"date":"2024-04-17T09:25:42","date_gmt":"2024-04-17T01:25:42","guid":{"rendered":"https:\/\/www.1ai.net\/?p=8272"},"modified":"2024-04-18T10:04:19","modified_gmt":"2024-04-18T02:04:19","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8stable-diffusion%e5%ae%9e%e7%8e%b0%e8%89%ba%e6%9c%af%e5%86%99%e7%9c%9f%ef%bc%8cstable-diffusion%e4%bd%bf%e7%94%a8instantid%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0ai","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/8272.html","title":{"rendered":"How to use Stable Diffusion to achieve artistic photography, Stable Diffusion uses the InstantID plug-in to achieve AI photography"},"content":{"rendered":"<p data-track=\"350\" data-pm-slice=\"0 0 []\">Recently, we have received a lot of questions from our users about<a href=\"https:\/\/www.1ai.net\/en\/tag\/ai%e5%86%99%e7%9c%9f\" title=\"[SEES ARTICLES WITH [AI TRUE] LABELS]\" target=\"_blank\" >AI Photo<\/a>aspect of the message, I hope to write some articles about AI portraits. Individuals concerned about the AI photo for a period of time, the Internet has also seen a lot of articles written tutorials and cases, as an avid fan of AI painting, naturally, can not help but go to the operation of the practice of AI photo, I will write a series of articles as a topic later on, the actual operation of their own in the process of the bits and pieces of the record, I hope that can help you all.<\/p>\n<p data-track=\"351\">The so-called AI portrait, simply put, is the use of AI tools to generate portraits of people, here we mainly use the AI tools are<a href=\"https:\/\/www.1ai.net\/en\/tag\/stable-diffusion\" title=\"_Other Organiser\" target=\"_blank\" >Stable Diffusion<\/a>AI Realization<a href=\"https:\/\/www.1ai.net\/en\/tag\/%e8%89%ba%e6%9c%af%e5%86%99%e7%9c%9f\" title=\"[Sees articles with labels]\" target=\"_blank\" >Art Photo<\/a>There are many ways to play, today we introduce AI for artistic portraits of one of the simplest way to realize: plug-in face-swapping method.<\/p>\n<p data-track=\"352\">Plug-in face replacement method is to use plug-in tools to recognize the features of the characters' five senses, especially the facial features, and then generate a new photo, the new photo and the original picture of the face as much as possible to maintain the same.<\/p>\n<p data-track=\"353\">The plugin used here is<a href=\"https:\/\/www.1ai.net\/en\/tag\/instantid\" title=\"[See articles with [InstantID] labels]\" target=\"_blank\" >InstantID<\/a>. For the basics of InstantID and how to install it, you can refer to the previous article [Stable Diffusion [ControlNet]:<a href=\"https:\/\/www.1ai.net\/en\/8342.html\/\">Achieving Persona Consistency with the InstantID Plugin<\/a>]<\/p>\n<p data-track=\"354\"><strong>I. InstantID realizes the production method of plug-in face swap<\/strong><\/p>\n<p data-track=\"355\"><strong>[Step 1]: Selection of large model<\/strong><\/p>\n<p data-track=\"356\">The big model supported by InstantID plugin is SDXL big model, so we should not choose the big model based on SD 1.5 training. Here we use LEOSAM HelloWorld|SDXL realism big model, the latest version is V5.0.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8277\" title=\"get-506\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-506.jpg\" alt=\"get-506\" width=\"708\" height=\"73\" \/><\/div>\n<p data-track=\"357\">Here's our VAE model choosing \"None.\"\u3002<\/p>\n<p data-track=\"358\"><strong>\u3010Step 2\u3011\uff1aWriting prompt words<\/strong><\/p>\n<p data-track=\"359\"><strong>Positive prompt words:<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"360\">Prompt: high quality,masterpiece,rich details,realistic photography,8k,high-definition image quality.<\/p>\n<p data-track=\"361\">1 girl,solo,brown eyes,brown hair,long hair,dress,earrings,white dress,fields,fields of flowers,looking at the audience.<\/p>\n<p data-track=\"362\">outdoors, pink flowers.<\/p>\n<\/blockquote>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"363\">Cue words: high quality, masterpiece, rich detail, photorealistic, 8k, HD quality.<\/p>\n<p data-track=\"364\">A girl, solo, brown eyes, brown hair, long hair, dress, earrings, white dress.<\/p>\n<p data-track=\"365\">Fields, flowers, fields of flowers, looking at the audience, outdoors, pink flowers.<\/p>\n<\/blockquote>\n<p data-track=\"366\"><strong>Reverse prompt words:<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"367\">easynegative,ng_deepnegative_v1_75t,(worst quality:2),(low quality:2),(normal quality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),(( watermark)),<\/p>\n<\/blockquote>\n<p data-track=\"368\">Related parameter settings of Wensheng diagram<\/p>\n<ul>\n<li data-track=\"369\">Sampler: DPM++2M Karras<\/li>\n<li data-track=\"370\">Sampling iteration number: 30<\/li>\n<li data-track=\"371\">Image width and height: It is recommended to set it to around 1024.<\/li>\n<li data-track=\"372\">Cue Factor for Guidance (CFG): between 3 and 5<\/li>\n<\/ul>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8273\" title=\"get-502\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-502.jpg\" alt=\"get-502\" width=\"883\" height=\"346\" \/><\/div>\n<p data-track=\"373\"><strong>\u3010Step 3\u3011ControlNet plug-in InstantID model setting<\/strong><\/p>\n<p data-track=\"374\">Two ControlNet units are required here.<\/p>\n<p data-track=\"375\"><strong>ControlNet Unit 0: Upload original image of a real person<\/strong><\/p>\n<p data-track=\"376\">Here we use photos of Fairy Sister to generate AI artistic photos.<\/p>\n<p data-track=\"377\">Note that the image here should be around 1024 in size.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8274\" title=\"get-503\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-503.jpg\" alt=\"get-503\" width=\"855\" height=\"982\" \/><\/div>\n<p data-track=\"378\">The relevant parameter settings are as follows:<\/p>\n<ul>\n<li data-track=\"379\">Control type: Select \"Instant_ID\"<\/li>\n<li data-track=\"380\">Preprocessor: instant_id_face_embedding<\/li>\n<li data-track=\"381\">Model: ip-adpter_instanid_sdxl<\/li>\n<li data-track=\"382\">Control weight: 1<\/li>\n<\/ul>\n<p data-track=\"384\"><strong>ControlNet unit 1: Upload face positioning photo<\/strong><\/p>\n<p data-track=\"385\">Upload any photo, its role is to control the final image of the character&#039;s face position. We can do the same as the first picture.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8276\" title=\"get-505\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-505.jpg\" alt=\"get-505\" width=\"856\" height=\"991\" \/><\/div>\n<p data-track=\"386\">The relevant parameter settings are as follows:<\/p>\n<ul>\n<li data-track=\"387\">Control type: Select \"Instant_ID\"<\/li>\n<li data-track=\"388\">Preprocessor: instant_id_face_keypoints<\/li>\n<li data-track=\"389\">Model: control_instant_id_sdxl<\/li>\n<li data-track=\"390\">Control weight: around 0.5 (0.45-0.5)<\/li>\n<\/ul>\n<p data-track=\"391\"><strong>\u3010Step 4\u3011Image generation<\/strong><\/p>\n<p data-track=\"392\">Click the [Generate] button and let\u2019s take a look at the final generated image effect.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8275\" title=\"get-504\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-504.jpg\" alt=\"get-504\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8278\" title=\"get-507\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-507.jpg\" alt=\"get-507\" width=\"1080\" height=\"1080\" \/><\/div>\n<p data-track=\"393\"><strong>II. Changing the background of a character's clothing<\/strong><\/p>\n<p data-track=\"394\">We can change the character's clothes, background and other elements in the picture by modifying the positive cue word.<\/p>\n<p data-track=\"395\"><strong>Prompt 1: Christmas Portraits<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"396\"><strong>Prompt:<\/strong>high quality,masterpiece,rich details,realistic photography,8k,high-definition image quality,<\/p>\n<\/blockquote>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"397\">1 girl,solo,exquisite hairstyle,brown hair,long hair,Christmas clothing,Christmas dress,bow,Christmas hat,Christmas,festive atmosphere. indoor,upper body,christmas lights,tree,gift box,roses,ribbons,Christmas decorations,lighting,fireplace,warm.<\/p>\n<p data-track=\"398\">\n<\/blockquote>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"399\"><strong>Tips:<\/strong>High quality, masterpiece, rich in detail, photorealistic, 8k, HD quality,...<\/p>\n<p data-track=\"400\">1 girl, solo, delicate hairstyle, brown hair, long hair, Christmas costume, Christmas dress, bow, Christmas hat, Christmas, festive atmosphere, indoor, upper body, Christmas lights, Christmas tree, gift box, roses, ribbons, Christmas decorations, lights, fireplace, heater,<\/p>\n<\/blockquote>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8281\" title=\"get-510\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-510.jpg\" alt=\"get-510\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8279\" title=\"get-508\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-508.jpg\" alt=\"get-508\" width=\"1080\" height=\"1080\" \/><\/div>\n<p data-track=\"401\"><strong>Tip #2: Wedding Dresses<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"402\"><strong>Prompt:<\/strong>high quality,masterpiece,rich details,realistic photography,8k,high-definition image quality,<\/p>\n<p data-track=\"403\">1 girl,solo,exquisite hairstyle,crown,headscarf,hair bun.<\/p>\n<p data-track=\"404\">White wedding dress,long dress,jewelry,looking at the audience,<\/p>\n<p data-track=\"405\"><strong>Tips:<\/strong>High quality, masterpiece, rich in detail, photorealistic, 8k, HD quality,...<\/p>\n<p data-track=\"406\">1 girl, solo, elaborate hairstyle, crown, headscarf, chignon.<\/p>\n<p data-track=\"407\">White wedding dress, long skirt, jewelry, looking at the audience.<\/p>\n<\/blockquote>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8282\" title=\"get-511\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-511.jpg\" alt=\"get-511\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8280\" title=\"get-509\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-509.jpg\" alt=\"get-509\" width=\"1080\" height=\"1080\" \/><\/div>\n<p data-track=\"408\"><strong>3. Change the character&#039;s posture<\/strong><\/p>\n<p data-track=\"409\">We can change the character's action pose with ControlNet's unit 1. Just replace the uploaded character picture of ControlNet's cell 1.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8285\" title=\"get-514\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-514.jpg\" alt=\"get-514\" width=\"859\" height=\"991\" \/><\/div>\n<p data-track=\"410\">The generated image effect is as follows.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8283\" title=\"get-512\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-512.jpg\" alt=\"get-512\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8287\" title=\"get-516\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-516.jpg\" alt=\"get-516\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8286\" title=\"get-515\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-515.jpg\" alt=\"get-515\" width=\"1080\" height=\"1080\" \/><\/div>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8284\" title=\"get-513\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/04\/get-513.jpg\" alt=\"get-513\" width=\"1080\" height=\"1080\" \/><\/div>\n<p data-track=\"411\"><strong>IV. Summary<\/strong><\/p>\n<p data-track=\"412\">Plug-in face changing method to achieve AI art portraits, the advantage is that the operation is very simple, the face effect of maintaining consistency is still relatively excellent. But there are also some shortcomings.<\/p>\n<p data-track=\"413\">(1) The InstantID plugin is only used for SDXL large models, limiting the use of many LORA models because many LORA models are trained on SD 1.5 base models.<\/p>\n<p data-track=\"414\">(2) the overall lack of realism in the generated picture, especially the color rendering feeling is not very in place, it is not clear whether this is the reason for the big model or the plug-in itself. If you have a better big model or parameter settings can leave a message to communicate with the discussion of learning together oh.<\/p>\n<p data-track=\"415\">Okay, that\u2019s all for today\u2019s sharing. I hope that what I shared today will be helpful to you.<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Recently received a number of users about the AI photo message, I hope to write some articles about AI photo. Individuals concerned about the AI photo for some time, the Internet has seen a number of articles written tutorials and cases, as an avid fan of AI painting, naturally, can not help but go to the operation of the practice of AI photo, I will write a series of articles as a topic to the back, the actual operation of their own in the process of the bits and pieces of the record, I hope it can be helpful to everyone. The so-called AI photo, simply put, is the use of AI tools to generate a portrait of the characters of the photo, here we mainly use the AI tool is Stable Diffusion. AI to achieve artistic portraits have a variety of ways to play, and today we introduce AI for artistic portraits of the simplest way to achieve: plug-in!<\/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":[2272,1221,197,198,2271],"collection":[262],"class_list":{"0":"post-8272","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-ai","9":"tag-instantid","10":"tag-stable-diffusion","12":"tag-2271","13":"collection-stablediffusion"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/8272","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=8272"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/8272\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=8272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=8272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=8272"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=8272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}