ComfyUI Node
Image Patch Editor
A ComfyUI node in ImgPatch with 11 inputs and 5 outputs.
Image Patch Editor
- original_image
- edited_image
- merged_image
- final_mask
- heatmap
- raw_mask
- debug_overlay
◄detection_alg▾►
◄region_size8►
◄stride1►
◄min_area_size4►
◄tolerance0.50►
◄blur_radius3.0►
◄mask_expansion0►
◄edit_max_alpha1.00►
◄allow_rescaletrue►
CategoryImgPatch
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | — | |
| edited_image | IMAGE | — | |
| detection_alg | COMBO | 3 options: difference, l2_norm, ssim | |
| region_size | INT | 81–128 | Size of the blocks used for difference detection. |
| stride | INT | 11–64 | Step size for the sliding window. 1 means full overlap (slowest, most accurate), equal to region_size means no overlap (fastest). |
| min_area_size | INT | 40–128 | Minimum size of the changed area to keep. |
| tolerance | FLOAT | 0.500–5 | Sensitivity of difference detection. Higher values will detect more changes. |
| blur_radius | FLOAT | 3.00–100 | Radius of the gaussian blur applied to the mask. |
| mask_expansion | INT | 0-128–128 | Expand or shrink the mask. Positive values expand, negative values shrink. |
| edit_max_alpha | FLOAT | 1.000–1 | Maximum alpha for the edited image overlay. |
| allow_rescale | BOOLEAN | true | If true, rescales the edited image to match original size. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| merged_image | IMAGE | The original image with the patched areas from the edited image. |
| final_mask | MASK | The final mask used for merging. White indicates changes (taken from edited image), black indicates unchanged areas. |
| heatmap | IMAGE | Visualization of differences. Brighter areas indicate larger differences between original and edited images. |
| raw_mask | MASK | Initial binary mask before post-processing. White indicates detected changes, black indicates no change. |
| debug_overlay | IMAGE | Original image with a red overlay highlighting the detected changes. |