https://github.com/shmbatom/Comfyui-ImageAB-Compare
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.
https://github.com/shmbatom/Comfyui-ImageAB-Compare
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/shmbatom/Comfyui-ImageAB-Compare
- Owner: shmbatom
- License: mit
- Created: 2026-01-05T06:20:05.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-05T12:16:23.000Z (5 months ago)
- Last Synced: 2026-01-11T06:48:57.406Z (5 months ago)
- Language: JavaScript
- Size: 4.99 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **Comfyui-ImageAB-Compare** - time mouse interaction to adjust split ratios, bidirectional linkage between slider and mouse, and the ability to export comparison images with precise split lines. (Workflows (3998) sorted by GitHub Stars)
README
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][def3]
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][def2]
(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][def4]
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][def9]
[def1]: images/girl.png
[def2]: images/after_run.png
[def3]: images/before_run.png
[def4]: images/structure.png
[def9]: images/donate.png