{"id":12724,"date":"2024-06-09T09:47:32","date_gmt":"2024-06-09T01:47:32","guid":{"rendered":"https:\/\/www.1ai.net\/?p=12724"},"modified":"2024-06-09T09:47:32","modified_gmt":"2024-06-09T01:47:32","slug":"stable-diffusion%e5%85%a5%e9%97%a8%e6%95%99%e7%a8%8b%ef%bc%8c%e5%a6%82%e4%bd%95%e7%94%9f%e6%88%90%e8%a7%92%e8%89%b2%e5%bd%a2%e8%b1%a1%e4%b8%80%e8%87%b4%e6%80%a7%e7%9a%84%e5%9b%be%e5%83%8f","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/12724.html","title":{"rendered":"Stable diffusion introductory tutorial, how to generate consistent images for character images"},"content":{"rendered":"<p data-track=\"1\" data-pm-slice=\"0 0 []\">Do you need to create a consistent AI character from different perspectives? For example, the image below shows the effect.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12725\" title=\"get-306\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-306.jpg\" alt=\"get-306\" width=\"1024\" height=\"1024\" \/><\/div>\n<p data-track=\"2\"><strong>1. Implementation Principle<\/strong><\/p>\n<p data-track=\"3\">Create a grid image of the same character from different perspectives, as shown below.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12726\" title=\"get-307\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-307.jpg\" alt=\"get-307\" width=\"1024\" height=\"1024\" \/><\/div>\n<p data-track=\"4\">Use ControlNet&#039;s Canny SDXL control model to generate the character outline, as shown in the figure below.<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12728\" title=\"get-309\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-309.jpg\" alt=\"get-309\" width=\"1024\" height=\"1024\" \/><\/div>\n<p data-track=\"5\">Then use IP Apadter FaceID Plus v2 to copy the face from another reference image. Since IP Apadter FaceID only copies the face. It can precisely extract facial features from the reference image, it can accurately transfer the face to a different perspective.<\/p>\n<p data-track=\"6\"><strong>2. Production method<\/strong><\/p>\n<p data-track=\"7\"><strong>[Step 1]: Selection of large model<\/strong><\/p>\n<p data-track=\"8\">It is recommended to use: ProtoVision XL-High Fidelity-No Refiner, version v6.6.0.<\/p>\n<p data-track=\"9\">Model download address<\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"10\"><strong>LiblibAI<\/strong>:https:\/\/www.liblib.art\/modelinfo\/3a3d10aa7fe644158c08a5a43da358db<\/p>\n<\/blockquote>\n<p data-track=\"11\"><strong>\u3010Step 2\u3011\uff1aWriting prompt words<\/strong><\/p>\n<p data-track=\"12\">Let\u2019s take the first picture above as an example to illustrate.<\/p>\n<p data-track=\"13\"><strong>Positive prompt words<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"14\"><strong>Prompt<\/strong>\uff1acharacter sheet, color photo of woman, white background, blonde long hair, beautiful eyes, black shirt<\/p>\n<p data-track=\"15\"><strong>Prompt word<\/strong>: Character sheet, color photo of woman, white background, long blonde hair, beautiful eyes, black shirt<\/p>\n<\/blockquote>\n<p data-track=\"16\"><strong>Reverse prompt word<\/strong><\/p>\n<blockquote class=\"pgc-blockquote-abstract\">\n<p data-track=\"17\">disfigured, deformed, ugly, text, logo<\/p>\n<\/blockquote>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12727\" title=\"get-308\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-308.jpg\" alt=\"get-308\" width=\"1080\" height=\"360\" \/><\/div>\n<p data-track=\"18\">Related parameter settings<\/p>\n<ul>\n<li data-track=\"19\">Sampler: DPM++ 2M Karras<\/li>\n<li data-track=\"20\">Sampling iteration number: 20<\/li>\n<li data-track=\"21\">Image width and height: 1024*1024.<\/li>\n<li data-track=\"22\">Prompt word guidance coefficient (CFG): 7<\/li>\n<\/ul>\n<p data-track=\"23\"><strong>[Step 3]: ControlNet settings<\/strong><\/p>\n<p data-track=\"24\">Here we need to configure 2 ControlNet units.<\/p>\n<p data-track=\"25\"><strong>ControlNet Unit 0<\/strong>: canny control model configuration<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12729\" title=\"get-310\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-310.jpg\" alt=\"get-310\" width=\"1080\" height=\"948\" \/><\/div>\n<p data-track=\"26\">The relevant parameter settings are as follows:<\/p>\n<ul>\n<li data-track=\"27\">Control type: Choose Canny (hard edge)<\/li>\n<li data-track=\"28\">Preprocessor: canny<\/li>\n<li data-track=\"29\">Model: diffusers_xl_canny_mid<\/li>\n<li data-track=\"30\">Control weight: 0.4<\/li>\n<li data-track=\"31\">Guided intervention time: 0<\/li>\n<li data-track=\"32\">Guide termination time: 0.5<\/li>\n<\/ul>\n<p data-track=\"34\"><strong>ControlNet Unit 1<\/strong>: Ip-Adapter control model configuration<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12730\" title=\"get-311\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-311.jpg\" alt=\"get-311\" width=\"1080\" height=\"785\" \/><\/div>\n<p data-track=\"35\">The relevant parameter settings are as follows:<\/p>\n<ul>\n<li data-track=\"36\">Control type: Select IP-Adapter<\/li>\n<li data-track=\"37\">Preprocessor: ip-adapter_face_id_plus<\/li>\n<li data-track=\"38\">Model: ip-adapter-faceid-plusv2_sdxl<\/li>\n<li data-track=\"39\">Control weight: 0.7<\/li>\n<li data-track=\"40\">Guided intervention time: 0<\/li>\n<li data-track=\"41\">Boot termination time: 1<\/li>\n<\/ul>\n<p data-track=\"43\"><strong>[Step 4]: Use ADetailer to automatically repair the face<\/strong><\/p>\n<p data-track=\"44\">Since there are many faces in the picture, ADetailer needs to be turned on to repair the face. Model selection: face_yolov8n.pt<\/p>\n<div class=\"pgc-img\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12731\" title=\"get-312\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-312.jpg\" alt=\"get-312\" width=\"1080\" height=\"578\" \/><\/div>\n<p data-track=\"45\">\u3010<strong>Step 5<\/strong>\u3011Image generation<\/p>\n<p data-track=\"46\">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-12732\" title=\"get-313\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/06\/get-313.jpg\" alt=\"get-313\" width=\"1024\" height=\"1024\" \/><\/div>\n<p data-track=\"47\"><strong>3. Related instructions<\/strong><\/p>\n<p data-track=\"48\">(1) The ControlNet canny and Ip Adapter controllers used here are both based on SDXL, so the large model selected must be a large model based on SDXL.<\/p>\n<p data-track=\"49\">(2) Since the grid mainly displays portraits of people, the pictures uploaded should preferably be portraits of people. Full-body photos may not produce ideal results.<\/p>\n<p data-track=\"50\">(3) Free customization: In the above production process, we only need to change the picture of the IP Adapter, and we can also modify the positive prompt words according to our own needs.<\/p>\n<p data-track=\"51\">(4) If the face does not match the picture<\/p>\n<ul>\n<li data-track=\"52\">Increase the controller weight of IP Adapter<\/li>\n<li data-track=\"53\">Reduce the control weight and guidance termination timing of Canny ControlNet<\/li>\n<\/ul>\n<p data-track=\"54\">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>Do you need to create consistent AI characters from different viewpoints? For example, the following image effect. I. Realization Principle Create a mesh image of the same character from different viewpoints, as shown in the following figure. Use ControlNet's Canny SDXL control model to generate an outline of the character, as shown below. Then use IP Apadter FaceID Plus v2 to copy the face from another reference image. Since IP Apadter FaceID copies only the face. It can accurately extract the facial features from the reference image and hence can accurately transfer the face to a different viewpoint. II. Production Method [Step 1]: Selection of Large Model Here we recommend using: ProtoVision<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[197,207],"collection":[262],"class_list":["post-12724","post","type-post","status-publish","format-standard","hentry","category-baike","tag-stable-diffusion","tag-207","collection-stablediffusion"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/12724","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=12724"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/12724\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=12724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=12724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=12724"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=12724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}