{"id":344,"date":"2023-05-14T20:43:56","date_gmt":"2023-05-15T00:43:56","guid":{"rendered":"https:\/\/kryptech.name\/site\/?p=344"},"modified":"2023-05-19T07:15:02","modified_gmt":"2023-05-19T11:15:02","slug":"stable-diffusion-generations-cliffside-castle","status":"publish","type":"post","link":"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generations-cliffside-castle\/","title":{"rendered":"Stable Diffusion Generation: Cliffside Castle"},"content":{"rendered":"\n<p>I love rugged terrain so I thought I&#8217;d try generating a castle built into a towering mountain, going for an angle looking down from high elevation. I figured <a href=\"https:\/\/github.com\/AUTOMATIC1111\/stable-diffusion-webui\">Stable Diffusion<\/a> would struggle with the concept of both the castle <em>and<\/em> the mountain <em>and<\/em> the angle so I started with generating a number of images of looking down from a high mountain. I selected this picture:<\/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\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509.png\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509.png\" alt=\"\" class=\"wp-image-345\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509.png 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509-150x150.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>Initial generation of landscape<\/figcaption><\/figure><\/div>\n\n\n\n<p>I opened the image in <a href=\"https:\/\/www.gimp.org\/\">GIMP<\/a> and drew in some crude designs for castle battlements that could follow the shape of the mountain:<\/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\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509_EDIT-1.png\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509_EDIT-1.png\" alt=\"\" class=\"wp-image-350\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509_EDIT-1.png 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509_EDIT-1-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/00760-DPM-SDE-Karras-512x512-x8-3491440509_EDIT-1-150x150.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>Edit in colour for castle<\/figcaption><\/figure><\/div>\n\n\n\n<p>I ran a number of inpainting generations. I found that it helped to use &#8220;snow&#8221; in the negative prompt to discourage the light colour becoming snow. I settled on this variation and increased the contrast 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\/05\/01750-DDIM-512x512-x40-3227964914-1.png\"><img loading=\"lazy\" width=\"512\" height=\"512\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01750-DDIM-512x512-x40-3227964914-1.png\" alt=\"\" class=\"wp-image-351\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01750-DDIM-512x512-x40-3227964914-1.png 512w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01750-DDIM-512x512-x40-3227964914-1-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01750-DDIM-512x512-x40-3227964914-1-150x150.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><figcaption>Castle generated<\/figcaption><\/figure><\/div>\n\n\n\n<p>This was good enough for the low-resolution version so I upscaled at this point. That way I could work on inpainting specific areas to clean up or add more detail:<\/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\/05\/01755-DDIM-1024x1024-x40-1828033039-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01755-DDIM-1024x1024-x40-1828033039-1.png\" alt=\"\" class=\"wp-image-352\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01755-DDIM-1024x1024-x40-1828033039-1.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01755-DDIM-1024x1024-x40-1828033039-1-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01755-DDIM-1024x1024-x40-1828033039-1-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01755-DDIM-1024x1024-x40-1828033039-1-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Upscale<\/figcaption><\/figure><\/div>\n\n\n\n<p>I did a bunch of inpainting for the castle, in sections, with some editing with the GIMP in between inpaints to clean up and guide the direction better. I also inpainted the separate mountain to make it a little more striking. 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\/05\/01803-DDIM-1024x1024-x40-3407166594-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"1024\" src=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01803-DDIM-1024x1024-x40-3407166594-1.png\" alt=\"\" class=\"wp-image-353\" srcset=\"https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01803-DDIM-1024x1024-x40-3407166594-1.png 1024w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01803-DDIM-1024x1024-x40-3407166594-1-300x300.png 300w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01803-DDIM-1024x1024-x40-3407166594-1-150x150.png 150w, https:\/\/kryptech.name\/site\/wp-content\/uploads\/2023\/05\/01803-DDIM-1024x1024-x40-3407166594-1-768x768.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Inpaint castle and separate mountain<\/figcaption><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I love rugged terrain so I thought I&#8217;d try generating a castle built into a towering mountain, going for an angle looking down from high elevation. I figured Stable Diffusion would struggle with the concept of both the castle and the mountain and the angle so I started with generating a number of images of &#8230;<a class=\"post-readmore\" href=\"https:\/\/kryptech.name\/site\/index.php\/stable-diffusion-generations-cliffside-castle\/\">read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":354,"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\/344"}],"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=344"}],"version-history":[{"count":2,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":357,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions\/357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media\/354"}],"wp:attachment":[{"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kryptech.name\/site\/index.php\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}