This tutorial presents novel nodes and a workflow that allow fast seamless inpainting, outpainting, and inpainting only on a masked area in ComfyUI, similar to the AUTOMATIC1111 feature but with extra flexibility.
The main advantages of inpainting only in a masked area with these nodes are:
- It's much faster than sampling the whole image.
- It enables setting the right amount of context from the image for the prompt to be more accurately represented in the generated picture.
- It enables upscaling before sampling in order to generate more detail, then stitching back in the original picture.
- It enables downscaling before sampling if the area is too large, in order to avoid artifacts such as double heads or double bodies.
- It enables forcing a specific resolution (e.g. 1024x1024 for SDXL models)..
- It doesn't modify the unmasked part of the image, not even passing it through VAE encode and decode.
- The nodes take care of good blending.
The Inpaint Crop and Stitch nodes can be downloaded using ComfyUI-Manager, just look for "Inpaint-CropAndStitch".
The example workflow featured in this video can be downloaded from https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch
I hope you like them!! Subscribe for more :)
The song playing in the background is "The last dial-up handshake", from the album "Last Transmission" of my music project "Elezeta". Check it here:
https://www.youtube.com/watch?v=0LAtsYw17kg&list=OLAK5uy_lqOWEdKGRHVr77GoOEEJO9axzNrX0juA8&index=1
#comfyui #stablediffusion #genai #inpainting #tutorial #workflow