RuYi image-compare
Compare Any Two Outputs Without Rewiring
- images
You've just run three seeds, or two LoRA stacks, or the same prompt through two checkpoints - and now you want them side by side. The stock answer is a two-image compare node: wire A into one socket, B into another, then rewiring every time you want a different pairing. RuYi image-compare is the "stop doing that" node - one terminal that keeps every image you throw at it, lets you pick any two to A/B on the fly, and can save the winner without touching the graph.
It ships inside RuYi-Nodes, a small utility pack from RuYi-Xiao (multi-LoRA loader, text-preview, this). Nothing here is a headline act; the whole pack is "things that make iterating less annoying," and image-compare is the best example of the idea.
How it works
The node is a viewer, not a processor - in ComfyUI terms it's an output node that emits nothing and just renders to your screen. What makes it different from a plain two-image compare is the input. images is an autogrow socket: connect one IMAGE output and you get one input; connect a second and a new socket appears, up to 64 inputs by the pack's own limit. No node ever grows into your graph for you - just keep dragging wires in.
Every run, the backend converts each connected frame to a preview and a thumbnail in ComfyUI's temp directory, records its resolution and PNG file size, and hands the list to a custom frontend widget - and that widget is where the magic lives. Pick your A and B from the dropdowns above the preview (any two of whatever's connected), then flip between two modes:
- Compare mode: Wipe - move the pointer across the preview and the split line follows it. The classic slider reveal.
- Compare mode: Click - click to hard-swap between A and B.
Each image also gets a row in the list below: display name, save name (an independent template for actually saving), resolution, file size, an auto-save toggle, and a manual save button.
The inputs that matter
The schema is refreshingly small. images is the whole game - the more you connect, the more you can compare. The only other input, save_manifest, is a STRING widget (default "{}") that the node uses internally to persist your display names, save names, auto-save keys, and filename template across runs. It's a JSON blob you basically never type by hand; the node writes it for you. Wire images, ignore save_manifest, done.
There are no outputs, so this node sits at the end of a chain like Preview Image or Save Image does. Nothing else can consume it; it's purely an eyeball.
Saving what survives
When you do save, images land in ComfyUI/output/RuYi-Compare/ by default, named from %display_name-date:yyyy-MM-dd_HHmmss% unless you set your own template. The variables are %display_name%, %save_name%, plus auto-generated %index%, %input%, %frame%, and %date:...%. You can bake in a relative subfolder (e.g. Compare/%display_name-date:yyyy-MM-dd_HHmmss%) or give an absolute path. Two details worth knowing: display name and save name are independent, so you can label an image "second pass" in the UI while it saves under a filename that suits your archive - and since v0.1.20, saved PNGs carry ComfyUI's prompt and workflow metadata, so you can drag a winner back in to restore the whole graph.
Installing it
RuYi-Nodes has one of the friendliest dependency stories around: pyproject.toml lists zero Python dependencies beyond a normal ComfyUI install, and there are no model downloads. Two ways in:
# Option A - ComfyUI Manager: search "RuYi-Nodes", install, restart.
# Option B - manual:
cd ComfyUI/custom_nodes
git clone https://github.com/RuYi-Xiao/RuYi-Nodes.git
# then restart ComfyUI
After restart, add "RuYi image-compare" and hook it to your IMAGE outputs.
Gotchas
The changelog reads like an honest bug list. v0.1.20 fixed image-compare previews vanishing after you switch away from a workflow tab and back, and - the nastier one - isolated each workflow's temp previews so two workflows with the same node IDs can't delete each other's previews. If you're on an older version and previews or save names misbehave, git pull and restart; this is a small pack that's clearly still under active development. Also note this node deliberately does not depend on the LoRA Manager sidecar files the pack's LoRA loader uses - that's only for metadata-aware LoRA features.
One honest caveat: this pack has essentially no community footprint - nothing on the comfyui/StableDiffusion Reddit corpora at all - so when something breaks, you're on your own with GitHub issues. The flip side is real: it's MIT-licensed, trivially small, and shipping fixes on a weekly cadence. For comparing sampler passes, LoRA variants, or upscale candidates, it's the fastest eyeball I know without turning your graph into a spaghetti farm.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | COMFY_AUTOGROW_V3 | — | |
| save_manifest | STRING | {} | — |
Outputs (0)
No outputs