ZML_图像过渡动画
Wipe from image A to image B, frame by frame
- 图像A
- 图像B
- 过渡批次
- 遮罩批次
ZML_ImageTransition (ZML_图像过渡动画) generates the frames of a transition between two images: image A starts on screen, image B wipes in across a set number of frames, and you get both the resulting frames and the wipe masks that made them. If you've ever wanted a smooth hand-off between two stills - a title-card lead-in, a scene change in a frame sequence, an intro animation - this is a one-node way to get it.
It's from ComfyUI-ZML-Image, zml-w's 160+ node pack, added in a September 2025 update, and it sits in the plain image subcategory.
How it works
The node takes 图像A (start) and 图像B (end), resizes B to match A, and generates 帧数 (2–100) frames of a masked wipe between them. Each frame advances a hard-edged wipe mask, and the two images are composited through it: where the mask is white you see B, where it's black you see A. The 过渡方向 dropdown picks the wipe geometry - left-to-right, right-to-left, top-to-bottom, bottom-to-top, center-out, outer-in, or diagonal.
Two things make it more useful than a naive crossfade:
- 过渡曲线 (transition curve, 0.1–5.0) applies the progress as
progress^curve. Below 1 the wipe starts slow and accelerates; above 1 it starts fast and eases off. It's your "snappy lead-in vs. lazy dissolve" control, and it's the setting you'll actually fiddle with. - The 遮罩批次 (mask batch) output gives you every wipe mask as its own MASK frame. That's the sleeper feature - you get the transition and the geometry it ran on, so you can reuse those masks for compositing or drive another effect from the same wipe.
Outputs: 过渡批次 (the transition frames as an IMAGE batch) and 遮罩批次 (the wipe masks as a MASK batch).
Set expectations
This is a wipe/crossfade, not motion interpolation. A to B is a mask moving across the frame - there's no warping, no blending of the subjects, no "morph." If image A has a character on the left and B has one on the right, you get a hard edge sweeping between them, not a smooth morph. For a genuinely smooth morph you'd want a video-interpolation or warping pipeline. What this does give you is a clean, parameterized, dependency-free wipe you can export straight into a frame sequence or GIF.
Installing it
Pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
restart ComfyUI or use ComfyUI Manager (search "ComfyUI-ZML-Image"). This node is pure NumPy/PIL - no OpenCV, no models, nothing to download.
Where people get caught
The output is a batch of frames, and the first frame is fully image A and the last fully image B - the wipe only occupies the frames between. If you're feeding this into a video encoder, check the fps you're targeting against 帧数; 10 frames at 8fps is a 1.25-second transition. And since B is resized to A's dimensions, differing source ratios get stretched, not letterboxed - square up your inputs first if that matters.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| 图像A | IMAGE | — | |
| 图像B | IMAGE | — | |
| 帧数 | INT | 102–100 | — |
| 过渡方向 | COMBO | 从左到右 | 7 options: 从左到右, 从右到左, 从上到下, 从下到上, 从中心向外, 从外向中心, +1 |
| 过渡曲线 | FLOAT | 1.00.1–5 | 控制过渡速度的非线性。小于1加速,大于1减速。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 过渡批次 | IMAGE | — |
| 遮罩批次 | MASK | — |