CS Compare Any
CS Compare Any is ComfyUI's A/B diff tool
- source_a
- source_b
Every video workflow eventually hits the same question: is render A actually better than render B, or am I just telling myself that because I waited forty minutes for it? That's the gap CS Compare Any fills. It's the A/B testing rig for your graph - feed it two values of the same type and it shows you a side-by-side comparison you can actually scrub through, instead of saving two files and tabbing between image viewers.
It comes from the CineStyle pack, a set of video-focused utilities by chflame163 that mostly read like a Chinese-first production toolkit (the README is primarily Chinese; the pack is also quietly under the radar in the English community - you won't find much chatter about it, which is a shame, because the tooling is serious).
How it works
Under the hood it's two tools in one, and it picks which one you get by inspecting the inputs at run time.
Media mode kicks in for VIDEO, IMAGE, and MASK. The node decodes your inputs with PyAV, shrinks them to a lightweight preview (capped at 1 megapixel and 25 fps - enough to judge, not enough to finish on), and lines both up on a shared timeline using whichever clip is longer, black-padding the shorter one. That synchronized pair gets encoded and served back through ComfyUI's own server routes, so the node UI can give you two viewports with a draggable divider you wipe back and forth, synced playback, frame stepping, a timeline, audio, and zoom/pan. Want before/after on a color grade? Wipe it.
Text mode handles STRING, BOOL, INT, FLOAT, LIST, and DICT. It serializes both values (dicts get pretty-printed JSON) and runs Python's stdlib difflib over them, producing line-level diff rows with inline character-level highlighting - insertions, deletions, and replacements each get their own color, and the two panels scroll in sync. If you've ever diffed two JSON blobs by eye, this saves you the headache.
The inputs that matter
There are exactly three, and only one of them is a choice:
source_a/source_b- wildcard (*) inputs. Anything goes, but they must be the same type. If you feed an IMAGE intosource_aand a STRING intosource_b, you get an error panel instead of a comparison.view_port_layout-horizontalorvertical(defaulthorizontal). Horizontal stacks the viewports left/right; vertical stacks them top/bottom.
One thing to know before you wire it in: it has no outputs. It's an output node, a deliberate dead end. You don't route data through it, you park it at the end of two branches and read the result in its own panel. That's fine - that's what an inspector is for.
Where it shines
Reach for it when you're comparing two video renders (different samplers, two upscalers, one pipeline with and one without some detail-restore node), checking that a mask matches its source frame, or verifying that a node's STRING/DICT output actually changed after you tweaked a parameter. It's also quietly great at catching "did my workflow silently do nothing" - compare the output to the input and the diff tells you instantly.
Installing it
Standard CineStyle install: in ComfyUI Manager, search "ComfyUI_CineStyle", or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_CineStyle
then restart ComfyUI. Add it from the canvas as CS Compare Any, or browse to Add Node → 😺dzNodes/CineStyle. The pack's requirements.txt pulls in PyAV, transformers, timm, hydra, and friends - most of that heavy machinery exists for the pack's SAM-based segmentation nodes, not for this one, but pip install -r requirements.txt will still grab it all.
Things that bite
The two real traps: type mismatches (the node refuses to compare unlike types, so keep both branches the same kind), and the preview cap. That 1MP / 25fps limit means what you see in the viewport isn't final quality - it's for judging, not for exporting. When you've found the winner, save the real file with a proper save node. And on a long clip the first run has to decode and re-encode both sides, so it's not instant. Give it a few seconds; the progress panel will tell you it's working.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| source_a | * | First value to compare. | |
| source_b | * | Second value to compare. | |
| view_port_layout | COMBO | horizontal | Arrange the source A and comparison viewports horizontally or vertically. |
Outputs (0)
No outputs