The Easy Way to Outpaint in Stable Diffusion! Outpainting that actually Works!

Artificially Intelligent
28 May 202312:03

TLDRIn this tutorial, the YouTuber introduces an alternative method for outpainting in Stable Diffusion, which involves using inpainting to extend the canvas and seamlessly add new elements to an image. The process is explained step-by-step, including adjusting the canvas, setting denoising strength, and using scripts for multiple variations. The video also touches on latent upscale for quality enhancement and suggests using different models for final touches. The presenter demonstrates the technique with examples, highlighting the ease of use and the impressive results achievable without additional installations.

Takeaways

  • 🖼️ The video introduces an alternative method to outpaint using Stable Diffusion's inpainting feature.
  • 🖌️ The presenter finds traditional outpainting tools difficult to use and often resulting in unwanted images.
  • 📈 Outpainting is the process of extending the canvas of an image to make it appear as if it was originally larger.
  • 🔧 The method involves using the 'image to image' tab in Stable Diffusion, editing the canvas, and extending it in the desired direction.
  • 🎨 The presenter advises filling the extended black area with white or a color from the image to prepare for inpainting.
  • 🔄 Denoising strength is initially set to zero, then adjusted to around 0.40 for better inpainting results.
  • 🖥️ The presenter suggests using scripts to automate testing of different denoising levels for optimal results.
  • 📊 An XYZ plot is used to test a range of denoising values, generating multiple variations to find the best fit.
  • 🔄 Iterative adjustments are made to the image, using inpainting and adjusting denoising strength to refine the outpainted area.
  • 🔍 The final image is upscaled using advanced sampling methods with higher sampling steps for better quality.
  • 🌐 The video also mentions using other AI platforms like Leonardo AI for outpainting without needing Stable Diffusion.

Q & A

  • What is outpainting in the context of the video?

    -Outpainting is the process of extending the canvas of an image and painting in more of that picture, making it appear as if the picture was always a bigger image to begin with.

  • Why does the speaker prefer using inpainting for outpainting?

    -The speaker prefers using inpainting for outpainting because it is easier than using the traditional outpainting tool, which they find difficult to work with and often results in unwanted images.

  • How does the speaker suggest extending the canvas in Stable Diffusion?

    -The speaker suggests extending the canvas in Stable Diffusion by clicking on the pencil button above the image to edit the canvas and then dragging the canvas to extend it in the desired direction.

  • What is the purpose of setting the denoising strength to zero initially?

    -Setting the denoising strength to zero initially is done to create a black bar on the side of the image without altering the original picture.

  • How does the speaker recommend filling in the black area created during outpainting?

    -The speaker recommends filling in the black area by selecting a color, such as white, and painting over the black section, ensuring to overlap slightly into the actual image for a more natural transition.

  • What is the significance of the 'XYZ plot' trick mentioned in the video?

    -The 'XYZ plot' trick is used to automate the process of testing different denoising strengths by generating multiple variations within a specified range, allowing the user to find the optimal setting without manual adjustment.

  • Why does the speaker suggest using a higher sampling step during the final upscale?

    -Using a higher sampling step during the final upscale improves the quality of the image by using more advanced sampling methods, resulting in a cleaner and more detailed final product.

  • What is the difference between 'latent upscale' and actual resolution improvement according to the video?

    -Latent upscale improves the quality of the image but does not increase its resolution. To actually increase the resolution, one must use the upscaling feature found in the 'Extras' tab.

  • How does the speaker use the term 'upscale' in the video?

    -The speaker uses the term 'upscale' loosely to refer to latent upscale, which improves the quality of the image but not necessarily its resolution. For actual resolution improvement, they recommend checking out their video on upscaling.

  • What is the alternative method for outpainting mentioned at the end of the video?

    -The alternative method for outpainting mentioned at the end of the video is using Leonardo AI, which is a free AI image generator that allows for easy outpainting without needing Stable Diffusion.

Outlines

00:00

🎨 'Out Painting' with Stable Diffusion

The speaker introduces a method for 'out painting' using the in painting feature of Stable Diffusion. They explain that out painting is the process of extending a canvas to add more content to an image, making it appear as though the image was always larger. The tutorial walks through using the image-to-image tab in Stable Diffusion, editing the canvas to extend it, and then generating an image with an extended black bar. The black area is then filled in using in painting, adjusting denoising strength, and selecting the 'fill' option for mask content. The process involves iterative testing to find the optimal denoising level for the best results.

05:05

🖌️ Enhancing Images with Inpainting and Upscaling

The speaker discusses a technique for enhancing images using inpainting and upscaling. They mention using a specific model for inpainting and explain the difference between latent upscale and traditional resolution upscale. The tutorial includes creating an image using text-to-image, editing the canvas, and using inpainting to fill in a black bar with content that blends seamlessly with the original image. The speaker also suggests using different sampling methods for final image generation and provides a brief overview of upscaling to achieve high-resolution images.

10:08

🏰 Expanding Image Content with Leonardo AI

The final paragraph covers using Leonardo AI for out painting images. The speaker demonstrates how to upload an image and extend its canvas to add new content, such as a 'High Fantasy Castle in the snow'. They mention the use of tokens for image generation and the option to choose from multiple generated images. The process involves adjusting the guidance scale for better results and selecting the most satisfactory outcome. The speaker concludes by highlighting the ease of use of Leonardo AI as an alternative to Stable Diffusion for image enhancement.

Mindmap

Keywords

💡Outpainting

Outpainting refers to the process of extending the canvas of an existing image, adding new content to it as if the picture was always larger. In the context of the video, the presenter discusses a method to achieve outpainting using the 'inpainting' feature of Stable Diffusion, a tool that typically fills in missing or damaged parts of an image. The presenter's approach involves extending the canvas manually and then using inpainting to generate the new content on the extended area.

💡Stable Diffusion

Stable Diffusion is a machine learning model used for generating images from textual descriptions or editing existing images. The video mentions Stable Diffusion as the primary tool for performing the outpainting technique. The presenter uses its 'image to image' tab to extend and generate new parts of an image.

💡Inpainting

Inpainting is a technique used to fill in missing or damaged parts of an image. In the video, the presenter cleverly repurposes inpainting for outpainting by first extending the canvas and then using inpainting to generate content in the newly created black area, effectively 'filling in' the extension with new visual information.

💡Denoising Strength

Denoising Strength is a parameter in image generation models that determines the level of noise reduction applied to the output image. In the video, the presenter adjusts the denoising strength to control how much the generated content deviates from the original image, using it to fine-tune the outpainting results.

💡Seed

A seed in the context of image generation models is a random number used to initiate the generation process, ensuring that each run produces a different result. The video mentions using a seed to generate variations during the outpainting process, which can help in achieving a more natural extension of the image.

💡CFG Scale

CFG Scale likely refers to a control flow graph scale, a parameter that may affect how the model interprets and generates images based on the input data. The presenter suggests lowering the CFG scale during the outpainting process to achieve a better mesh of the newly generated content with the original image.

💡XYZ Plot

An XYZ plot is a method used to test different values of parameters to see their effects on the output. In the video, the presenter uses an XYZ plot to test various denoising strengths, generating multiple images to find the optimal setting for the outpainting task.

💡Latent Upscale

Latent Upscale is a process that improves the quality of an image without necessarily increasing its resolution. The video describes using latent upscale to enhance the quality of the outpainted image, suggesting that it can produce higher-quality results than simply increasing the resolution.

💡Sampling Steps

Sampling Steps refer to the number of iterations used in the image generation process. The presenter mentions increasing the sampling steps during the final upscale to achieve a higher quality image, implying that more iterations can lead to better image details and resolution.

💡Leonardo AI

Leonardo AI is another AI image generation platform mentioned in the video. The presenter uses Leonardo AI as an alternative method for outpainting, showcasing its ability to extend images with different styles and content, such as adding a 'High Fantasy Castle in the snow' to an existing image.

Highlights

Introduction to an alternative method for outpainting in Stable Diffusion.

Common issues with the default outpainting tool and its unreliability.

Explanation of outpainting as extending the canvas of an image.

Suggestion to use inpainting for outpainting purposes.

Step-by-step guide to outpaint using the image-to-image tab in Stable Diffusion.

Instructions on how to edit the canvas and extend it in the desired direction.

Recommendation to avoid scrolling inside the canvas to maintain the right size.

Setting denoising strength to zero for initial generation.

Process of sending the generated image to inpaint.

Technique of painting over the black area to prepare for inpainting.

Adjusting denoising strength and mask content settings for inpainting.

Iterative approach to achieve the desired outpainting result.

Use of scripts to automate testing of different denoising levels.

Latent upscale as a method to improve image quality in one go.

Importance of adjusting CFG scale and denoising strength for better meshing.

Final upscaling process with increased sampling steps for higher quality.

Alternative method using the model that created the image instead of the inpainting model.

Quick demonstration of outpainting on a new image.

Use of Azovia RPG artist tools and control Nets for image creation.

Explanation of how to make changes to the image using inpainting.

Bonus method using leonardo.ai for outpainting without Stable Diffusion.

Guidance on how to use the AI canvas in leonardo.ai for outpainting.

Different results from using varying guidance scales in leonardo.ai.

Final thoughts on the ease of outpainting using these methods.