ComfyUI MediaAB
Lightweight Image & Video A/B comparison for ComfyUI — just 2 nodes, zero temp-file clutter, clean Assets panel, 1px zoom-invariant divider, and smooth frame-accurate video sync.

Why MediaAB?
Most A/B tools in ComfyUI only handle images, come bundled inside huge multi-node packs, or dump temporary preview files into your temp/ / input/ folders and ComfyUI's Assets sidebar. MediaAB stays small, fast, and clean:
| What matters | Typical A/B nodes | ComfyUI_MediaAB |
| --- | --- | --- |
| Lightweight & minimal | Bundled in 50+ node packs | Only 2 nodes, pure vanilla JS, minimal dependencies |
| Image + Video | Images only | Both Image A/B and Video A/B with one consistent UI |
| Clean Assets & disk | Copies uploads to input/, pollutes Assets with temp/ files | Browser reads local drops directly; connected images stay in RAM — zero temp files, zero Assets clutter |
| Instant comparison | Must wire inputs and run the queue | Drop files from your computer or ComfyUI Assets panel to compare immediately |
| Pixel-level inspection | Divider thickens when zooming canvas; hijacks scroll wheel | Constant 1px divider at any canvas zoom, side-by-side resolutions, fullscreen, canvas zoom/pan preserved |
| Video scrubbing & sync | Laggy seeking, drifting playback | Drift-corrected sync, A/B audio switch, frame stepping (←/→), and full-res all-keyframe scrub cache |

Quick Start
Find both nodes under Add Node → MediaAB (example workflow: workflows/MediaAB_Example.json).
1. Image A/B Compare
- No-run mode: Click Select A / B, or drag images straight from your computer or ComfyUI's Assets panel onto the node.
- Wired mode: Connect two
IMAGEoutputs toimage_aandimage_b(Load Imagepreviews immediately; generated outputs update on run). - Inspect: Move your mouse to slide the divider (no dragging needed), switch between Slide / Side by side / A/B Toggle, or go Fullscreen.
2. Video A/B Compare
- Inputs: Drop local/asset videos directly, or connect native
VIDEO, VideoHelperSuiteFilenames, or a file path string (input/,output/,temp/, or absolute path). - Controls: Click or press
Spaceto play/pause, press←/→to step frame by frame, toggle loop, and choose whether to mute or listen to A or B audio.
Install
Requires a recent ComfyUI build with native VIDEO support and the modern ComfyUI frontend.
cd ComfyUI/custom_nodes
git clone https://github.com/xiaoshi-1990/ComfyUI_MediaAB.git
python -m pip install -r ComfyUI_MediaAB/requirements.txt
For the Windows portable build (run from the folder containing python_embeded):
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI_MediaAB\requirements.txt
Restart ComfyUI and refresh your browser (Ctrl + F5 if nodes do not appear immediately).
Good to Know
- Smart drag & drop: First drop fills A, second fills B. Once both sides are occupied, drop on the left half to replace A or the right half to replace B.
- Zero unnecessary copies: Local computer drops stay in the browser (
BlobURLs, not saved across reloads). Asset-panel drops save lightweight file references. ConnectedIMAGEpreviews live in a bounded RAM cache (up to 32 images / 256 MB). - Smooth HD video scrubbing: For videos in ComfyUI folders, MediaAB builds an on-CPU all-keyframe proxy in
temp/media_ab_hd(capped at 1 GB per file / ~2 GB total with automatic LRU cleanup) while dragging, then snaps back to the original file on release. - Bilingual UI: Follows ComfyUI's language automatically, with a per-node EN / 中 toggle saved in the workflow.