Updated: 1/10/2024
Outpainting, a method that extends the boundaries of an image through a diffusion model offers opportunities, for artistic expression and image improvement. This manual delves into the intricacies of outpainting using the ComfyUI interface providing a walkthrough from uploading images to generating the end result.
To get started users need to upload the image on ComfyUI. This can be done by clicking to open the file dialog and then choosing "load image." In this tutorial we are using an image, from Unsplash as an example showing the variety of sources for users to choose their base images.
After the image is uploaded, its linked to the "pad image for outpainting" node. This important step marks the start of preparing for outpainting. The goal here is to determine the amount and direction of expansion for the image. As an example we set the image to extend by 400 pixels. A feathering value of 200 is added to create a blend, between the image and the newly added section smoothing out any sharp edges effectively.
After setting up the configuration the data is then sent to the "VAE encode for inpainting". At this point the VAE value from a checkpoint is linked with a mask that outlines the region for enhancement. The result from this module is then linked to the "case amplifier" for processing the image input paving the way, for the crucial step of creating an outer painting.
Before editing the image it's important to choose a model that is specialized in working with images to achieve better results when expanding them. The selection of prompts is also crucial. Both positive and negative prompts are employed to direct the model striking a balance, between the image and the envisioned enhancements. For example prompts such as "looking at viewer" and "brown hair" are utilized, even if these attributes are not initially present in the image indicating the desired outcome for the expanded section.
When configuring the case sampler settings a consistent seed value is used for testing reliability along with adjustments to the sampler and scheduler based on recommendations, from the model. A denoising setting of one is selected to enhance image sharpness.
After adjusting the settings, a preview of the completed image is produced. This stage plays a role, in assessing how well the outpainting process works demonstrating the models capacity to produce an seamless expansion of the initial image using the input values provided.
This guide outlines a meticulous approach to outpainting in ComfyUI, from loading the image to achieving a seamlessly expanded output. The technique utilizes a diffusion model and an inpainting model trained on partial images, ensuring high-quality enhancements. For those eager to experiment with outpainting, a workflow is available for download in the video description, encouraging users to apply this innovative technique to their images.
A: The feathering value smoothens the transition between the original and expanded sections of the image, ensuring a natural-looking output.
A: Prompts guide the inpainting model, helping balance the existing image attributes with the envisioned expansion, thus influencing the final appearance of the outpainted section.
A: Yes, outpainting can be applied to any image. However, the outcome may vary based on the image's content and the specific settings used during the process.