Seamless Clone for ComfyUI
A custom node for ComfyUI that implements OpenCV's seamless cloning functionality, allowing you to blend images naturally using Poisson blending techniques.
Seamless image blending using OpenCV's
Three blending modes:
NORMAL_CLONE: Standard seamless
MIXED_CLONE: Mixed seamless cloning that preserves gradients
MONOCHROME_TRANSFER: Monochrome transfer mode
Automatic or manual center point selection
Compatible with ComfyUI's image processing pipeline
cd ComfyUI/custom_nodes/
git clone https://github.com/Aksaz/comfyui-seamless-clone
pip install -r requirements.txt
The node accepts the following inputs:
source_image: The image to be cloned (foreground)
destination_image: The target image (background)
mask_image: A binary mask defining the region to be cloned
blend_mode: Choose between NORMAL_CLONE, MIXED_CLONE, or MONOCHROME_TRANSFER
center_x: X-coordinate of the clone center (optional)
center_y: Y-coordinate of the clone center (optional)
Output:
cloned_image
: The resulting seamlessly blended imageSee the LICENSE file for details.
This node utilizes OpenCV's seamless cloning implementation based on the paper "Seamless Image Cloning and Editing" by Patrick Pérez, Michel Gangnet, and Andrew Blake.