#49 · Primary category: Image Generation
ComfyUI-Inpaint-CropAndStitch
ComfyUI nodes to crop before sampling and stitch back after sampling that speed up inpainting
Project last updated:08/21/26
GitHub Stars
1.1K
Forks
83
Contributors
7
License
GPL-3.0
Why we included this project
ComfyUI users doing serious inpainting tend to hit the same wall: the sampler runs over the whole canvas even when only a small patch needs fixing. These two nodes break that loop by running the sampler on just the masked region. The Crop node isolates that area and handles the fiddly parts around it: adding a context margin so the prompt still has the surrounding scene to read, optionally pre-resizing, filling mask holes, growing or blurring the mask, extending for outpainting, or forcing a resolution like 1024x1024 for SDXL models. The Stitch node blends the result back into the original without touching or re-encoding the unmasked pixels, so you save time and never disturb areas you meant to leave alone. Because the cropped image flows through any standard sampling workflow, you can upscale before sampling for extra detail, or downscale a large mask to avoid artifacts like duplicate limbs, and the final image gets reassembled for you. It's a focused utility that slots into an existing ComfyUI setup rather than a standalone app.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
stable-diffusion-webui
Stable Diffusion web UI
ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
diffusers
🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.
upscayl
🆙 Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.
InvokeAI
InvokeAI is a leading open-source creative engine for Stable Diffusion, offering an industry-leading web UI for generating and editing visual media.