← See All Custom Node Packs

ComfyUI-Inpaint-CropAndStitch

1115
Updated about 2 months ago
View on GitHub →See Common Issues →

Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

InpaintStitchImproved

ComfyUI Node Documentation: ✂️ Inpaint Stitch (Improved)

Overview

The ✂️ Inpaint Stitch (Improved) node is part of the ComfyUI-Inpaint-CropAndStitch suite, created by Luis Quesada Torres. This node is designed to seamlessly stitch an inpainted image back into the original image without affecting unmasked areas. It is an improved version of the original InpaintStitch node, providing more precise stitching and better support for larger workflows.

What This Node Does

The ✂️ Inpaint Stitch (Improved) node takes an inpainted version of a cropped image and integrates it back into its original location in the full-resolution image. This allows users to modify only specific areas of an image without altering other parts. The improvements ensure precise alignment and help avoid issues such as pixel shifts or unintended blurring at the seams.

Inputs

The ✂️ Inpaint Stitch (Improved) node requires the following inputs:

  1. Original Image: The full-resolution image from which a section has been cropped for inpainting.
  2. Inpainted Image: The modified or processed version of the cropped section.
  3. Mask: The mask indicating which part of the inpainted image should be blended into the original image.

Each input is essential for aligning and integrating the new inpainted details back into the original image without disrupting areas outside of the mask.

Outputs

The node produces the following output:

  • Stitched Image: The output is the original image with the inpainted segment seamlessly integrated back. The node ensures that the transition between modified and unmodified areas is smooth, with automatic blending at the seams.

How It Might Be Used in ComfyUI Workflows

The ✂️ Inpaint Stitch (Improved) node is typically used in workflows where specific parts of an image need modification or enhancement without altering the entire composition. Here’s how it might be integrated into a ComfyUI workflow:

  1. Initial Setup: Use the ✂️ Inpaint Crop (Improved) node to identify and extract the area of the image you intend to modify.
  2. Inpainting: Process the cropped section using the desired image model or enhancement algorithms.
  3. Stitching: Utilize the ✂️ Inpaint Stitch (Improved) node to precisely reinsert the modified section back into the original image.
  4. Final Touches: Perform any additional enhancements or adjustments as needed on the now-stiched full image.

This workflow is particularly useful in scenarios such as retouching images, localizing detail improvements, or running conditional transformations based on specific image areas.

Special Features or Considerations

  • Precision Stitching: This node offers enhanced precision, ensuring stitched images align perfectly without pixel shifting issues that could occur in previous versions.
  • Smooth Blending: The node automatically handles blending at the edges, making transitions between modified and unmodified areas more natural.
  • Improved Mask Handling: With support for grayscale masks and a high-pass filter for mask thresholds, it avoids treating near-transparent sections as masked, reducing user confusion.
  • Integration with Other Nodes: This node works seamlessly with other nodes in the ComfyUI-Inpaint-CropAndStitch set, providing consistent and efficient tools for complex workflows.

Conclusion

The ✂️ Inpaint Stitch (Improved) node is a powerful tool for image processing tasks that require precise manipulation of specific areas. Its integration and compatibility features allow it to be a core component in photographic editing workflows, efficiently merging modified segments back into original images while maintaining high visual quality.

Related nodes in comfyui-inpaint-cropandstitch

Want to try ComfyUI-Inpaint-CropAndStitch without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.