ComfyUI Node

TS Compare

The before/after wipe that doesn't lie about video

By AlexYez·Created 2 years ago·Updated a day ago· 11
TS Compare
  • image_a
  • image_b
    fps24.00
    label_abefore
    label_bafter

    You upscaled, denoised, color-graded, or retouched something, and now comes the part nobody ships a node for: did it actually get better, or did you just spend ten minutes making it different? TS Compare is the answer - a two-image A/B wipe that lives right in the node body, from AlexYez's "Timesaver" pack of 76 production-ready nodes. Feed it the before and the after, drag a divider across the result, and decide with your own eyes instead of alt-tabbing between two PNGs in a file browser.

    It's an output node (is_output_node), which is Timesaver-speak for "has no outputs - it is the destination." You wire it to the end of a graph the way you'd wire Preview Image, only it previews a comparison instead of a single result. Search shows it under TS/Utils, display name "TS Compare".

    How it works

    Both inputs are plain IMAGE tensors, and here's the genuinely clever bit: a single frame and a whole clip go into the same socket, and the node decides what to do from what arrives. A pair of one-frame batches is treated as two stills, kept as PNG. Detail is what people compare in a still - sharpness, artifacts, skin after retouching - and H.264 would destroy exactly that. As soon as either side is a batch, it switches to video mode: the two clips are assembled into a single file with A on top and B below, so they physically cannot drift out of sync, and only one decoder runs. Two separate players, by contrast, drift apart by a frame or two on fast motion and start lying about the comparison without ever telling you.

    Some mechanics worth knowing:

    • B is resized to A's frame. A wipe across two different sizes compares nothing, so the right side is stretched (LANCZOS) to match A. Make A the reference - usually the original - and B the processed result.
    • Uneven lengths don't cut. The shorter side holds its last frame rather than trimming the comparison short. Feed a single still and a 30-frame clip and the still becomes 30 copies - handy for checking an upscale against every original frame.
    • Stills are lossless, clips are a proxy. The video preview is H.264 "draft" quality, capped at 1280px wide. It's a player in a node, not a master - judge grain and gradients from a saved file, not from the wipe.

    The inputs you'll actually touch

    • image_a - left of the wipe, usually the original.
    • image_b - right of the wipe, usually the result.
    • label_a / label_b - captions under each half. Defaults "before" and "after" are honestly fine; change them when you're comparing two different treatments ("upscale A" vs "upscale B") and the defaults would lie.
    • fps - playback rate of the assembled clip, default 24. Ignored entirely for a pair of stills.

    That's the whole node. There are no other parameters to fiddle with, which is the point of a comparison tool.

    Installing it

    Timesaver is one pack covering all its nodes, so install it once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AlexYez/comfyui-timesaver
    cd comfyui-timesaver
    python -m pip install -r requirements.txt
    

    Then restart ComfyUI. Or skip the terminal - ComfyUI Manager → Custom Nodes Manager → search "Timesaver" → Install. On the Windows portable build, run pip from python_embeded\python.exe or dependencies land in the wrong interpreter. Note the pack's requirements.txt is heavy (it backs Whisper, Qwen VL, Silero and friends), so a full install pulls a lot even though TS Compare itself only needs numpy, Pillow, and imageio-ffmpeg for the encode.

    Gotchas

    • It shows nothing until you run the graph. The node body greets you with "Run the graph to compare" - it renders whatever the last run produced. Wire it, queue, then look.
    • The clip never autoplays, and pauses when a run starts or the node scrolls off screen. If your comparison looks frozen, hit Play - that's intended, not a bug.
    • Both sides must be 4D IMAGE batches. Feed it a None and it raises a clear "must be a batch shaped [B,H,W,C]" error instead of handing you a blank frame.
    • The wipe only means something at one size and one aspect. B stretches to A; if your two sides are different aspect ratios, the wipe lines won't match and you'll be judging a stretched picture.
    CategoryTS/Utils

    Inputs (5)

    NameTypeDefaultDescription
    image_aIMAGELeft of the wipe — usually the original.
    image_bIMAGERight of the wipe — usually the result. Resized to A's frame, because a wipe over two different sizes compares nothing.
    fpsFLOAT24.001–240Playback rate for the assembled clip. Ignored for a pair of stills.
    label_aSTRINGbeforeCaption on the left half.
    label_bSTRINGafterCaption on the right half.

    Outputs (0)

    No outputs