ComfyUI Node
Poisson Blend (Seamless Clone)
A ComfyUI node in Eric_Composer_Studio/compose with 12 inputs and 2 outputs.
Poisson Blend (Seamless Clone)
- background
- source
- source_mask
- image
- used_mask
◄modenormal►
◄auto_fittrue►
◄center_x-1►
◄center_y-1►
◄offset_x0►
◄offset_y0►
◄mask_shrink_px1►
◄post_feather_px0►
◄strength1.00►
CategoryEric_Composer_Studio/compose
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| background | IMAGE | Destination canvas. The output is the same size as this. | |
| source | IMAGE | Image containing the object to clone in. Must be the SAME SIZE as background (crop/pad the source to background size first if needed; centre + offset_x/y are then applied to the mask only). For a different-sized source, see the auto_fit toggle below. | |
| source_mask | MASK | Hard mask over source: which pixels to clone in. Anything > 0.5 is IN. Soft masks are binarised — OpenCV requires a binary mask. | |
| mode | COMBO | normal | normal (NORMAL_CLONE): standard Poisson, full colour/luminance match. Best for opaque objects. mixed (MIXED_CLONE): per-pixel stronger gradient wins. Best for transparent / wispy / textured things (foliage, smoke, hair). monochrome (MONOCHROME_TRANSFER): source contributes only luminance; hue/saturation come from the destination. |
| auto_fitopt | BOOLEAN | true | If source is a different size than background, automatically resize source and source_mask to background size BEFORE blending. With auto_fit OFF a size mismatch is an error. |
| center_xopt | INT | -1-1–16384 | Destination x-coordinate where the mask centroid lands (in pixels). -1 = use the source mask's own centroid (no movement). |
| center_yopt | INT | -1-1–16384 | Destination y-coordinate where the mask centroid lands. -1 = auto. |
| offset_xopt | INT | 0-16384–16384 | Additional x-shift applied AFTER center_x (lets you nudge without overriding the centroid). |
| offset_yopt | INT | 0-16384–16384 | Additional y-shift applied AFTER center_y. |
| mask_shrink_pxopt | INT | 10–64 | Erode mask by N pixels before cloning. Recommended >= 1 because OpenCV's seamlessClone fails / produces black borders if the mask touches the image border. Also reduces fringe artefacts at sharp matte edges. |
| post_feather_pxopt | INT | 00–128 | After Poisson blending, re-mix the result over the original background using a feathered version of the mask (Gaussian blur). 0 disables. Use this to soften the very edge of the cloned region without breaking the gradient match (the Poisson result is already seamless; this only helps if your mask edge is jagged). |
| strengthopt | FLOAT | 1.000–1 | Linearly blend (1-s)*background + s*poisson_result inside the mask. 1.0 = full Poisson. <1.0 lets some of the original (unmodified) source show through (only meaningful if source was already pre-pasted at the same coords as the mask). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| used_mask | MASK | — |