Nodes/comfyui-MGnodes/Flux Kontext Diff Merge (Optimized)
ComfyUI Node

Flux Kontext Diff Merge (Optimized)

A ComfyUI node in image/postprocessing with 11 inputs and 3 outputs.

By meanin2·Created 2 years ago·Updated 11 months ago· 3
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)

NameTypeDefaultDescription
original_imageIMAGE
edited_imageIMAGE
thresholdFLOAT0.020.01–1Sensitivity of change detection; lower values detect more subtle changes
detection_methodCOMBOadaptiveAlgorithm used to build the initial mask of differences
blend_methodCOMBOpoissonHow to merge the edited pixels back onto the original
mask_blurINT151–100Gaussian blur radius (in pixels) applied to the mask to soften edges
mask_expandINT80–50Dilate the detected mask by this many pixels before blurring
edge_featherINT150–50Additional feathering (fine Gaussian) after the main blur
min_change_areaINT2500–5000Ignore change blobs smaller than this area (pixel²)
global_thresholdFLOAT0.150.01–0.5Controls how aggressively the adaptive detector compensates for global shifts
manual_maskoptMASKUser-supplied 1-channel mask to override automatic detection

Outputs (3)

NameTypeDescription
merged_imageIMAGE
difference_maskMASK
preview_diffIMAGE