{"id":404,"date":"2023-10-15T07:34:09","date_gmt":"2023-10-15T11:34:09","guid":{"rendered":"https:\/\/kryptech.name\/site\/?p=404"},"modified":"2023-10-15T07:40:41","modified_gmt":"2023-10-15T11:40:41","slug":"stable-diffusion-generation-elf-in-a-tree","status":"publish","type":"post","link":"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generation-elf-in-a-tree\/","title":{"rendered":"Stable Diffusion Generation: Elf in a Tree"},"content":{"rendered":"\n<p>Let&#8217;s make a picture of a stylish elven man perched in a tree high above an ancient forest! Here&#8217;re the initial txt2img generation parameters, in <a href=\"https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui\">Stable Diffusion Webui<\/a>:<\/p>\n\n\n\n<p><em>Prompt: an elven warrior crouching on a huge tree branch, white hair, looking over shoulder, looking at camera, forest far below, towering trees, (moss:0.7), ornate clothes, ancient woods, fantasy, epic, 8k, 4k, intricate<br>Negative prompt: pointy ears<br>Steps: 20, Sampler: DPM++ SDE Karras, CFG scale: 7, Face restoration: CodeFormer, Denoising strength: 0.3<\/em><\/p>\n\n\n\n<p>(I want those ageless elven looks, but not the pointy ears!) Of the results this is the one I choose. I like the haziness of the distant forest.<\/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\/10\/01856-DPM-SDE-Karras-512x512-x20-182591349.png\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01856-DPM-SDE-Karras-512x512-x20-182591349.png\" alt=\"\" class=\"wp-image-405\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01856-DPM-SDE-Karras-512x512-x20-182591349.png 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01856-DPM-SDE-Karras-512x512-x20-182591349-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01856-DPM-SDE-Karras-512x512-x20-182591349-150x150.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>Initial generation<\/figcaption><\/figure><\/div>\n\n\n\n<p>I want the character to be looking more towards the camera, though, so I inpainted just the person with img2img to refine him somewhat. I did this a couple iterations. Here are the parameters:<\/p>\n\n\n\n<p><em>an elven warrior looking at the camera, white hair, ornate clothes, fantasy, epic, 8k, 4k, intricate<br>Negative prompt: pointy ears<br>Steps: 20, Sampler: DDIM, CFG scale: 7, Face restoration: CodeFormer, Denoising strength: 0.3<\/em><\/p>\n\n\n\n<p>Great face, though much too feminine. Still pointy ears! Also not a fan of the stuff in his hair. But we can fix these later.<\/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\/10\/01873-DDIM-512x512-x20-306271371.png\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01873-DDIM-512x512-x20-306271371.png\" alt=\"\" class=\"wp-image-407\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01873-DDIM-512x512-x20-306271371.png 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01873-DDIM-512x512-x20-306271371-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01873-DDIM-512x512-x20-306271371-150x150.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>Inpaint character to refine<\/figcaption><\/figure><\/div>\n\n\n\n<p>Time to upscale 2x to 1024 x 1024 using im2img&#8217;s SD Upscale script. Loving the ornate gilding and the way the fabric looks. The scenery looks peaceful and verdant.<\/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\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979.png\" alt=\"\" class=\"wp-image-408\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Upscale<\/figcaption><\/figure><\/div>\n\n\n\n<p>There are some definite issues we need to fix. The foot part of the boot is seriously messed up and the forearm looks too thin. As previously mentioned, there&#8217;s the not-manly face, the hair, and those pointy years. Let&#8217;s do some manual edits in <a href=\"https:\/\/www.gimp.org\/\">GIMP<\/a> so that we gave a better base to use in Stable Diffusion.<\/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\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT.png\" alt=\"\" class=\"wp-image-410\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01876-DPM-SDE-Karras-1024x1024-x20-3903342979_EDIT-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Manually touch up<\/figcaption><\/figure><\/div>\n\n\n\n<p>Let&#8217;s run this through img2img&#8217;s inpainting to incorporate those crude edits. Now he&#8217;s looking like an intense warrior dude, but still with those smooth elven features. Pointy ears &#8211; gone! He&#8217;s rocking braids instead of whatever was in his hair before. The forearm and hand look better and the boots are both stylish and functional.<\/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\/10\/01891-DDIM-1024x1024-x40-4213372303.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303.png\" alt=\"\" class=\"wp-image-411\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Inpainted touch-ups<\/figcaption><\/figure><\/div>\n\n\n\n<p>You&#8217;ll see there&#8217;s weirdness going on between the chest and legs. Ideally there should be a gap there through which we can see the forest below. Also, it looks like he&#8217;s wearing a skirt rather than trousers. Back to GIMP to make a few edits. Note the couple lighter lines on the back of the upper arm to encourage folds in the cloth.<\/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\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT.png\" alt=\"\" class=\"wp-image-412\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01891-DDIM-1024x1024-x40-4213372303_EDIT-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Manual edits for gap between chest and legs<\/figcaption><\/figure><\/div>\n\n\n\n<p>Much better! The shoulder cap looks a bit more coherent as well. And you can see how Stable Diffusion picked up on the fold hints for the shirt.<\/p>\n\n\n\n<p>I don&#8217;t love the top tree. First, there&#8217;s a stick that&#8217;s almost vertical at the top left and looks jarring. Second, I don&#8217;t want nearby branches on the right side &#8211; I want this big overhead branch to be jutting out on its own. So I did some editing in GIMP to paint out some of the growth.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766.png\" alt=\"\" class=\"wp-image-413\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01894-DDIM-1024x1024-x40-3694103766-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Inpainted gap edits, and touched up tree<\/figcaption><\/figure>\n\n\n\n<p>Now let&#8217;s run the edits through img2img inpainting to get the final result. The branches look a little more gnarled and the leaves softer. Ta-da!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545.png\" alt=\"\" class=\"wp-image-414\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/10\/01899-DDIM-1024x1024-x40-3795990545-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Final version<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s make a picture of a stylish elven man perched in a tree high above an ancient forest! Here&#8217;re the initial txt2img generation parameters, in Stable Diffusion Webui: Prompt: an elven warrior crouching on a huge tree branch, white hair, looking over shoulder, looking at camera, forest far below, towering trees, (moss:0.7), ornate clothes, ancient &#8230;<a class=\"post-readmore\" href=\"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generation-elf-in-a-tree\/\">read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":416,"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\/404"}],"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=404"}],"version-history":[{"count":4,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/404\/revisions"}],"predecessor-version":[{"id":418,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/404\/revisions\/418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media\/416"}],"wp:attachment":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media?parent=404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/categories?post=404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/tags?post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}