santa hat
deerdeer nosedeer glow
Sign In

Outpainting ComfyUI with Stable Diffusion (by ThinkDiffusion)

Outpainting ComfyUI with Stable Diffusion (by ThinkDiffusion)

Expanding an image by outpainting with this ComfyUI workflow

Enhance your images with ComfyUI's Outpainting workflow

Photographers, digital artists, and content creators now have access to an advanced tool for effortlessly expanding their images beyond the original frame. Outpainting has become an essential workflow for those seeking state-of-the-art capabilities.

Utilizing cutting-edge generative AI, users can seamlessly increase the dimensions of their images, maintaining high quality regardless of the aspect ratio. Simply submit your image, choose the expansion direction, and let the AI work its magic. Embrace this workflow today to expand your creative possibilities and explore new artistic avenues.

What is Outpainting?

Outpainting allows for the creation of any desired image beyond the original boundaries of a given picture. That is, you can enlarge photographs beyond their original boundaries using the capabilities of artificial intelligence.

Whether you begin with photographs, paintings, or art generated by artificial intelligence, you may utilize the workflow to enlarge images that closely resemble the original in terms of style and colors. When it comes to fascinating ones to utilize, outpainting is up there. It aids in the expansion of an existing image in one or more directions depending on the resolution settings and sampling methods.

Expanding an image by outpainting with this ComfyUI workflow

Expanding an image by outpainting with this ComfyUI workflow

The outpainting function allows artists and casual users of generative AI to have greater control over the final product, in contrast to images that are exclusively generated by AI. If you want your images to go beyond their confines, outpainting is a strong technique to apply. You may use this to make a panorama, add more details to an existing image, or even extend the background.

Applications of Outpainting

  • Customized Digital Artwork: Artists may create one-of-a-kind digital artworks with the outpainting tool by expanding the canvas to add more features and elements. This comes in handy particularly when working on complicated subjects or expansive vistas that call for a bigger canvas.

  • Film and Animation: As an economical substitute for hand-drawn or computer-generated imagery, the outpainting function is utilized in the film and animation business. Useful for generating panoramic views or wide-angle pictures, it extends subjects or backdrops.

  • Advertising and Marketing: Marketers can also benefit from outpainting, a method that allows them to change the aspect ratio of images to fit different ad platforms. For billboard ads, for instance, a square image can be outpainted to a landscape format; for mobile ads, it can be outpainted to a portrait format.

  • Game Design: Outpainting is a technique commonly used in the gaming industry to create diverse game worlds. This can greatly aid game creators in rapidly creating new levels or sceneries, thus saving precious time and resources.

  • Interior Design and Architecture: A great way to see how different architecture plans or design ideas would look is with outpainting. To illustrate the impact of alterations or additions to a room's design, interior designers might use it to expand the room's picture.

  • Fashion and Apparel Design: Outpainting allows designers to amplify the design of an accessory or garment. They can see how everything will turn out and make any necessary adjustments using this method.

  • Reimagining Historical or Classic Art: Traditional or vintage artworks can be given a modern twist by artists employing outpainting techniques. This is the process of giving an existing work a new lease on life by giving it new features or styles.

Outpainting in ComfyUI

Expanding an image by outpainting with this ComfyUI workflow

Expanding an image by outpainting with this ComfyUI workflow

Eventually, you'll have to edit a picture to fix a detail or add some more space to one side. Although the process is straightforward, ComfyUI's outpainting is really effective. Be aware that outpainting is best accomplished with checkpoints that have been specifically trained for the task. Inpainting is added to the name of the base model to make a common name for them.

A unique model usually yields better results, while regular checkpoints can be utilized for outpainting. Typically, DreamShaper is utilized for these types of workflows. Similar to inpainting, outpainting still makes use of an inpainting model for best results and follows the same workflow as inpainting, except that the Pad Image for Outpainting node is added. In order to make the outpainting magic happen, there is a node that allows us to add empty space to the sides of a picture. The feathering option is available, but it's usually unnecessary. Increasing the grow_mask_by in the VAE Encode (for Inpainting) node actually yields better results.

One-Time Setup

Let's get the hard work out of the way, this is a one time set up and once you have done it, your custom nodes will persist the next time you launch a machine.

  1. Download the workflow here OUTPAINTING

  2. Launch a ThinkDiffusion machine. You can use the  Turbo machine when running this machine as it is quite intensive on the graphics card.

  3. Drag and drop the workflow .json files into your ComfyUI machine workspace to test the missing custom nodes.

  4. If there are red coloured nodes, download the missing custom nodes using ComfyUI manager or by using the Git URL.

  5. If there are red coloured nodes, download the missing models using ComfyUI manager or by using the Git URL.

Custom Nodes

UE Nodes

Install this custom node using the ComfyUI Manager. Search “everywhere” in the search box, select the Use Everywhere (UE Nodes) in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the Use Everywhere custom node

Installing the Use Everywhere custom node

IPAdapter Plus

Install this custom node using the ComfyUI Manager. Search “ipadapter” in the search box, select the ComfyUI_IPAdapter_plus in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the IPAdapter Plus custom node

Installing the IPAdapter Plus custom node

ComfyUI Inpaint Nodes

Install this custom node using the ComfyUI Manager. Search “inpaint” in the search box, select the ComfyUI Inpaint Nodes in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI Inpaint custom node

Installing the ComfyUI Inpaint custom node

Impact Pack

Install this custom node using the ComfyUI Manager. Search “impact” in the search box, select the ComfyUI Impact Pack in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI Impact pack custom node

Installing the ComfyUI Impact pack custom node

Comfyroll Studio

Install this custom node using the ComfyUI Manager. Search “comfyroll” in the search box, select the ComfyUI_Comfyroll_CustomeNodes in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI comfyroll studio custom node

Installing the ComfyUI comfyroll studio custom node

rgthree

Install this custom node using the ComfyUI Manager. Search “rgthree” in the search box, select the rgthree’s ComfyUI Nodes in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI rgthree custom node

Installing the ComfyUI rgthree custom node

Efficiency Nodes

Install this custom node using the ComfyUI Manager. Search “efficiency” in the search box, select the Efficiency Nodes for ComfyUI Version 2.0+   in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI Efficiency custom node

Installing the ComfyUI Efficiency custom node

Advanced Clip

Install this custom node using the ComfyUI Manager. Search “advanced clip” in the search box, select the Advanced CLIP Text Encode   in the list and click Install. Restart the ComfyUI machine in order for the newly installed model to show up.

Installing the ComfyUI Advanced clip custom node

Installing the ComfyUI Advanced clip custom node

Models

Download these recommended models using the ComfyUI manager and restart the machine after uploading the files in your ThinkDiffusion My Files.

Some of the files are larger and above 2GB size, follow the instructions here UPLOAD HELP by using Google Drive method, then upload it to the ComfyUI machine using a Google Drive link. Restart the ComfyUI machine in order for the newly installed model to show up. Another method is copy link address of download button/icon from civitai or huggingface and paste into the Upload section of ThinkDiffusion My Files using the copied URL.

For ease of use, here is a google drive link to the MODELS.

Reminder

  • You can use the MAT and Fill inpaint model if you have those models. But I have still recommend the LAMA.

  • You can test the other DreamShaper xl base models especially the v2.1. I chose the turbo version as the stable version for me.

How to Use

Download the workflow here OUTPAINTING

Now that the hard work is out of the way, let's get creative!. For most use cases, you only need to do the steps that are marked required change. You need to follow the steps from top to bottom. The workflow is a one-click process and you don’t  need to worry if there’s a default model that was already installed them in your ThinkDiffusion My Files. You can re-run the queue prompt when necessary in order to achieve your desired results.

Reminder

  • In the last group node, after the queue prompt is completed, wait for 1 minute in the outpainted image node to appear. Highly recommended to use the Turbo machine since the base model uses an SDXL checkpoint.

The Examples

Download the examples HERE

Frequently Ask Questions

  1. What is Outpainting?

Contrarily, outpainting is an extrapolation technique that makes use of newly generated pixels to enlarge the image's visual narrative while maintaining contextual consistency with the original. Your image can now be stretched beyond its original dimensions.

  1.  What is ComfyUI?

An easy-to-use, robust Stable Diffusion UI, ComfyUI makes use of a graph and nodes interface. Integrating models, prompts, and other nodes allows you to build a personalized process. Rapid expansion has allowed it to include phenomena beyond Stable Diffusion.

If you’re having issues with installation or slow hardware, you can try any of these workflows on a more powerful GPU in your browser with ThinkDiffusion.

If you enjoy ComfyUI and you want to test out creating awesome animations, then feel free to check out this AnimateDiff tutorial here.

Original article can be found here: https://learn.thinkdiffusion.com/outpainting-comfyui-with-stable-diffusion/

15

Comments