ComfyUI Node
Flux Kontext Diff Merge (Optimized)
A ComfyUI node in image/postprocessing with 11 inputs and 3 outputs.
Flux Kontext Diff Merge (Optimized)
- original_image
- edited_image
- manual_mask
- merged_image
- difference_mask
- preview_diff
◄threshold0.02►
◄detection_methodadaptive►
◄blend_methodpoisson►
◄mask_blur15►
◄mask_expand8►
◄edge_feather15►
◄min_change_area250►
◄global_threshold0.15►
Categoryimage/postprocessing
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | — | |
| edited_image | IMAGE | — | |
| threshold | FLOAT | 0.020.01–1 | Sensitivity of change detection; lower values detect more subtle changes |
| detection_method | COMBO | adaptive | Algorithm used to build the initial mask of differences |
| blend_method | COMBO | poisson | How to merge the edited pixels back onto the original |
| mask_blur | INT | 151–100 | Gaussian blur radius (in pixels) applied to the mask to soften edges |
| mask_expand | INT | 80–50 | Dilate the detected mask by this many pixels before blurring |
| edge_feather | INT | 150–50 | Additional feathering (fine Gaussian) after the main blur |
| min_change_area | INT | 2500–5000 | Ignore change blobs smaller than this area (pixel²) |
| global_threshold | FLOAT | 0.150.01–0.5 | Controls how aggressively the adaptive detector compensates for global shifts |
| manual_maskopt | MASK | User-supplied 1-channel mask to override automatic detection |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| merged_image | IMAGE | — |
| difference_mask | MASK | — |
| preview_diff | IMAGE | — |