2025-11-24 19:56:36 +01:00
2025-11-22 15:01:20 +01:00
2025-11-22 14:24:21 +01:00
2025-11-22 13:34:34 +01:00
2025-11-24 19:56:36 +01:00
2025-11-24 19:56:36 +01:00
2025-11-22 14:24:21 +01:00
2025-11-24 19:56:36 +01:00
2025-11-22 14:00:48 +01:00
2025-11-22 14:24:21 +01:00
2025-11-24 18:11:21 +01:00

ComfyUI-ImgPatchEditor

A ComfyUI node for patching images using a difference detection algorithm. It detects changes between two images (original and patched), creates a mask of the differences, and merges them back together with configurable blending.

Features

  • Automatic Patch Detection: Compares two images to find changed regions.
  • Configurable Masking: Control region size, minimum area, threshold, and blur radius.
  • Batch Support: Process multiple image pairs in a batch.
  • Output: Returns both the merged image and the generated mask.

Installation

  1. Clone this repository into your ComfyUI/custom_nodes/ directory.
  2. Install dependencies:
    pip install -r requirements.txt
    

Usage

Add the Image Patch Editor node (Category: ImgPatch) to your workflow.

Inputs

  • image_1: The original base image.
  • image_2: The patched/modified image.
  • region_size: Size of the blocks used for difference detection (default: 8).
  • min_area_size: Minimum size of changed areas to keep (removes noise) (default: 4).
  • threshold: Sensitivity threshold for difference detection (default: 10).
  • blur_radius: Blur radius applied to the mask for smooth blending (default: 3.0).

Outputs

  • IMAGE: The final merged image.
  • MASK: The mask representing the patched areas.
S
Description
No description provided
Readme MIT
3.4 MiB
Languages
Python 98%
Shell 2%