Skip to content

A fully functional ComfyUI node plugin that supports image segmentation and comparison in both horizontal and vertical directions, real-time interaction and adjustment of segmentation ratios via mouse, bidirectional linkage between slider and mouse, and the ability to export comparison images with precise segmentation lines.

License

Notifications You must be signed in to change notification settings

shmbatom/Comfyui-ImageAB-Compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comfyui-ImageAB-Compare - the comfyui plugin of comparing two images

image split comparison horizontally/vertically, real-time mouse interaction to adjust split ratios, bidirectional linkage between slider and mouse, and the ability to export comparison images with precise split lines.

I. Functional Features

✅ Dual-mode segmentation comparison: Supports both vertical (left-right) and horizontal (top-bottom) segmentation directions

✅ Real-time interactive adjustment: Precise control of segmentation line position with mouse movement

✅ Exportable segmentation image: This is an optional parameter, allowing for output preview or saving of the image. The segmentation ratio is set through "split_ratio_when_output" before_run

II. Installation method

Method 1: Manual Installation (Recommended)

(1) cd Comfy\custom_nodes;

(2) git clone https://github.com/shmbatom/Comfyui-ImageAB-Compare.git ;

(3) Restart the ComfyUI Service.

Method 2: Installation via Manager

(1) Search for Comfyui-ImageAB-Compare in the ComfyUI Manager and install

III. How to Use

✅1. Basic usage

(1) In the ComfyUI editor, double-click to search for "abc", locate the "ImageABCompareSee" node, and click it to insert it into the ComfyUI editor, or drag the following image into the page; before_run

(2) Connect the two images that need to be compared to the ImageA and ImageB input ports;

Note: ImageA can be downloaded the file named "custom_nodes\Comfyui-ImageAB-Compare\images\girl.png".

(3) Run to the "ImageABCompareSee" node to see the real-time comparison preview within the node;

(4) Mouse movement on the preview area of the node, and the dividing line will be adjusted in real-time according to the mouse position, facilitating real-time comparison and viewing of the differences between the two images;

(5) Switch direction: Select "vertical" (left-right) / "horizontal" (top-bottom) from the dropdown box.

✅2. Export a comparison image with a specified split ratio

(1) Precise adjustment: Precisely control the split position through the "split_ratio_when_output" slider (0.0-1.0) ;

(2) Connect the "Image_output" port of the node to the "Save Image" node and save it in "Comfy\output" (with the same size as ImageA);

(3) Connect the "Image_output" port of the node to the "Preview Image" node to view without saving.

IV. Directory Structure

this_structure

V. Compatibility

To be adapted: ComfyUI-nodes2.0

VI. Update Log

v1.0.0 2026/1/5 Initial version, supporting basic image AB comparison function

VII. License

This plugin is open-sourced under the MIT License, allowing free modification, distribution, and commercial use, as long as the original author's information is retained.

VIII. Feedback and Suggestions

If you encounter any issues or have suggestions for features, please contact QQ2540968810 or

GitHub Issues (recommended) https://github.com/shmbatom/Comfyui-ImageAB-Compare/issues

IX. Donation
If you think this tool is decent, you can donate a cup of coffee to me.

donate_me

About

A fully functional ComfyUI node plugin that supports image segmentation and comparison in both horizontal and vertical directions, real-time interaction and adjustment of segmentation ratios via mouse, bidirectional linkage between slider and mouse, and the ability to export comparison images with precise segmentation lines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published