{"id":389,"date":"2023-06-14T12:46:56","date_gmt":"2023-06-14T16:46:56","guid":{"rendered":"https:\/\/kryptech.name\/site\/?p=389"},"modified":"2023-06-14T12:46:58","modified_gmt":"2023-06-14T16:46:58","slug":"stable-diffusion-generation-android","status":"publish","type":"post","link":"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generation-android\/","title":{"rendered":"Stable Diffusion Generation: Android"},"content":{"rendered":"\n<p>I worked on a headshot of an android with <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui\" target=\"_blank\">Stable Diffusion Webui<\/a>. I wanted it to look quite human but with some features that were a bit off, like panels and plastic-y skin (think Data from <em>Star Trek: The Next Generation<\/em>). So I started with a regular person. The setting is at night in the city with neon lighting. I wanted curly dark hair, for a change. Puffy jackets are the best so I put that in the prompt too. \ud83d\ude42 Here&#8217;s the starter shot I settled on:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_proc.jpg\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_proc.jpg\" alt=\"\" class=\"wp-image-392\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_proc.jpg 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_proc-150x150.jpg 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Next I needed to &#8220;androidize&#8221; the character. I used <a rel=\"noreferrer noopener\" href=\"https:\/\/www.gimp.org\/\" target=\"_blank\">GIMP<\/a> to draw lines on the face and neck so that Stable Diffusion would have some direction in how to make the features more robotic. I ditched the earrings, too.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_EDIT_proc.jpg\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_EDIT_proc.jpg\" alt=\"\" class=\"wp-image-393\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_EDIT_proc.jpg 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_EDIT_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/00853-DPM-SDE-Karras-512x512-x100-72278227_EDIT_proc-150x150.jpg 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>I ran this through Stable Diffusion&#8217;s img2img inpainting, so that only the skin parts would be changed. I ended up getting good results for the neck but not the face. I finally discovered that the face restoration (Codeformer) was &#8220;fixing&#8221; the lines on the face! I ended up merging my input with one of the inpainting outputs that had a good neck. I darkened the lines on the face some.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01950-DDIM-512x512-x40-4128688802_MERGE_proc.jpg\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01950-DDIM-512x512-x40-4128688802_MERGE_proc.jpg\" alt=\"\" class=\"wp-image-394\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01950-DDIM-512x512-x40-4128688802_MERGE_proc.jpg 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01950-DDIM-512x512-x40-4128688802_MERGE_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01950-DDIM-512x512-x40-4128688802_MERGE_proc-150x150.jpg 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Time to upscale using img2img! That turned out pretty well, with the panels on the face having a slightly different shade that makes them look less like skin and match the neck. The eye on the left ended up kinda gimpy, though, probably due to the face restoration being switched off.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc.jpg\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc.jpg\" alt=\"\" class=\"wp-image-395\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc.jpg 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc-150x150.jpg 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01953-DPM-SDE-Karras-1024x1024-x20-1358394893.0_proc-768x768.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Now to fix the eye and work on the expression more. I wanted a slightly concerned look. I inpainted only the eye area so I could turn on the face restoration again. Here&#8217;s what I settled on, with some gently knit eyebrows. \ud83d\ude42<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc.jpg\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc.jpg\" alt=\"\" class=\"wp-image-396\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc.jpg 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc-150x150.jpg 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_proc-768x768.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Still a little too human-looking for my taste. I thought I&#8217;d tinker with the eyes because any changes there should immediately ring &#8220;not human&#8221; alarm bells. I used GIMP to draw some yellow lines in the eyes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc.jpg\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc.jpg\" alt=\"\" class=\"wp-image-397\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc.jpg 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc-150x150.jpg 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01957-DDIM-1024x1024-x40-825562993_EYES_proc-768x768.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Finally I inpainted just the eyes themselves with a low &#8220;Denoising strength&#8221; so that the lines would look more organic while retaining some angularity. Here&#8217;s the end result:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc.jpg\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc.jpg\" alt=\"\" class=\"wp-image-398\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc.jpg 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc-300x300.jpg 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc-150x150.jpg 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/06\/01962-DDIM-1024x1024-x40-2388079136_proc-768x768.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I worked on a headshot of an android with Stable Diffusion Webui. I wanted it to look quite human but with some features that were a bit off, like panels and plastic-y skin (think Data from Star Trek: The Next Generation). So I started with a regular person. The setting is at night in the &#8230;<a class=\"post-readmore\" href=\"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generation-android\/\">read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":390,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[24,30,29],"_links":{"self":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/389"}],"collection":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/comments?post=389"}],"version-history":[{"count":2,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/389\/revisions\/399"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media\/390"}],"wp:attachment":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media?parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/categories?post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/tags?post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}