Nodes/ComfyUI LivePhoto Creator/Image Compare Transition
ComfyUI Node

Image Compare Transition

A Clean Wipe Between Two Images, Ready for Video

By stormcenter·Created 2 years ago·Updated 2 years ago· 39
Image Compare Transition
  • image1
  • image2
  • frames
frames30
fps8

This is the pack's surprise third node. While the other two exist to make iPhone Live Photos, ImageCompareTransition is a general-purpose effect: it takes two images and generates a sliding left-to-right wipe between them. It's the thing you reach for when you want a before/after reveal - original vs. upscaled, a model comparison, a style swap - without leaving the graph to cut video in another tool.

Let me be upfront about what it isn't: "smooth transition" in the README is doing some heavy lifting. This is not a crossfade and there's no easing curve. It's a hard vertical boundary that sweeps across the frame, like a window shade. Which is fine - that's exactly the look most before/after comparisons want.

How it works

The mechanism is refreshingly simple and lives in about twenty lines. It resizes both images down to the smaller of their two dimensions (bilinear), then generates frames images where a split line moves from left to right. One image fills the frame, and the other is revealed progressively as the boundary sweeps. Every intermediate frame is a straight slice of both originals - no blending, no warping, no interpolation between pixels. The output is a single IMAGE batch, [F, H, W, C], clamped to 0–1.

Two inputs matter, one is a formality:

  • image1 and image2 (IMAGE) - the two stills. Order matters: the transition reveals image1 sliding over image2, so think about which side you want to end on.
  • frames (INT, 2–120, default 30) - how many frames the wipe takes. More frames = smoother, longer.
  • fps (FLOAT, 1–60, default 8) - here's the fun part: this value isn't actually used by the function at all. It's metadata, sitting there so downstream video nodes know how fast to play the result back. Doesn't change a single pixel.

The single output is frames - the transition sequence as an IMAGE batch.

Wiring it up

The obvious path, and the one the README points at, is into VHS (VHS_VideoCombine) to save the wipe as a real video file. But since you're here from the LivePhoto pack, there's a cuter option: feed the frames output straight into LivePhotoCreator and get a Live Photo that's a transition between two looks. Two LoadImage nodes in, a phone-ready file out.

Gotchas

The one that bites people: both images get downscaled to the smaller one's dimensions. Feed a 1024px image and a 512px image and you get a 512px wipe - the resolution of your good image is silently discarded. Match your source sizes first. Also, since there's no easing, a 30-frame wipe moves at constant speed the whole way, which looks mechanical in long transitions; drop frames and crank fps if you want it snappier.

Installing it

Part of the ComfyUI LivePhoto Creator pack, so it installs with the other two nodes. ComfyUI Manager: search "ComfyUI LivePhoto Creator", install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/stormcenter/ComfyUI-LivePhotoCreator

Dependencies are the same as the rest of the pack - opencv-python, pillow, plus a system ffmpeg binary if you're encoding the result:

pip install opencv-python pillow
sudo apt-get install ffmpeg   # or brew install ffmpeg / the Windows installer

Restart and you'll find it under image/animation. No models, no weights, no downloads beyond the pack itself.

Categoryimage/animation

Inputs (4)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
framesINT302–120
fpsFLOAT81–60

Outputs (1)

NameTypeDescription
framesIMAGE