A specialized node for ComfyUI that integrates OpenCV's seamless cloning capabilities, enabling natural image blending through Poisson blending techniques.
- Seamless blending of images with three distinct modes: NORMAL_CLONE, MIXED_CLONE, and MONOCHROME_TRANSFER.
- Automatic resizing and validation of image boundaries to handle mismatched proportions effectively.
- Fallback to alpha blending if seamless cloning encounters difficulties, ensuring a continuous workflow.
Context
This tool serves as a custom node within the ComfyUI framework, designed to facilitate the seamless integration of one image into another. By employing OpenCV's advanced cloning methods, it allows users to blend images in a way that appears natural and cohesive.
Key Features & Benefits
The node offers several practical features that enhance the image processing capabilities of ComfyUI. The three blending modes cater to different needs: NORMAL_CLONE for standard blending, MIXED_CLONE for preserving gradients, and MONOCHROME_TRANSFER for monochrome images. Automatic resizing ensures that images fit together perfectly, which is crucial for preventing boundary errors during the blending process.
Advanced Functionalities
This node includes advanced capabilities such as automatic center point selection, allowing users to specify the focal point of the cloning operation either manually or automatically. Additionally, the node is equipped with robust handling of image proportions, ensuring that the source and mask images are resized to match the destination image dimensions. If seamless cloning fails due to complex image geometry, the node automatically resorts to a simpler alpha blending method, maintaining usability even in challenging scenarios.
Practical Benefits
By incorporating this tool into their workflow, users can significantly enhance their control over image blending processes in ComfyUI. The ability to seamlessly blend images improves the overall quality and efficiency of projects, allowing for more creative freedom and reducing the time spent on manual adjustments.
Credits/Acknowledgments
This tool was developed by Aksaz and leverages OpenCV's seamless cloning techniques, originally detailed in the paper "Seamless Image Cloning and Editing" by Patrick Pérez, Michel Gangnet, and Andrew Blake. The project is licensed under the MIT License, ensuring open access and collaborative contributions.