Nodes/ComfyUI_Swwan/Transition Images Multi (Swwan)
ComfyUI Node

Transition Images Multi (Swwan)

Join separate images with a wipe, in the order you want

By aining2022·Created 10 months ago·Updated about 18 hours ago· 33
Transition Images Multi (Swwan)
  • image_1
  • image_2
  • IMAGE
◄inputcount2►
◄interpolation▾►
◄transition_type▾►
◄transitioning_frames2►
◄blur_radius0.0►
◄reversefalse►
◄deviceCPU►

Same wipe effects as its batch sibling, different input shape: instead of one IMAGE batch you get a row of sockets - image_1, image_2, image_3 … - and the node walks them in order, sliding, circling or fading each into the next. That's the node you want when the sequence lives in separate branches of the graph rather than in one batch, which is most real workflows: three different prompts, three renders, one clip.

The pack classifies it under Swwan/Advanced/Image rather than /Batch, and that's the honest difference. Same engine, different plumbing.

How it works

You set inputcount and the node expects that many images (the frontend script swwan_dynamic_inputs.js is what adds and removes the sockets when you change the value - nudge it and the node redraws). It starts from image_1, and for each subsequent image it takes the last frame already assembled, generates transitioning_frames wipe frames into the new image's first frame, and appends the whole new image after them. So the output is: all of image 1, then the transition, then all of image 2, then the transition, and so on.

Each new input is resized to the first image's dimensions with Lanczos before it's used - a deliberate convenience, and the main behavioural difference from the batch version, which assumes everything already matches. Mixing a 1024×1024 render with a 768×1152 one works here; it just upscales/downscales rather than complaining.

The wipe maths is the shared one: an eased alpha (eight curves, including the overshooting bounce and elastic) drives a shaped mask - slides, box, circle, doors, fade - composited as first * (1 − mask) + next * mask, with an optional separable Gaussian blur on the mask edge for softness. reverse flips direction. device: GPU does the work on the torch device.

Inputs and outputs

Required: inputcount (2–1000), image_1, interpolation, transition_type, transitioning_frames (default 2, minimum 2), blur_radius, reverse, device. Optional: image_2 - and beyond that, the dynamically added image_N sockets. Output: one IMAGE batch containing the full assembled sequence.

Sixty-four-plus images in a single transition chain will technically work. It will also be very slow and quite hard to read on the canvas, so split the job.

Install

Ships in the pack:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/aining2022/ComfyUI_Swwan.git
cd ComfyUI_Swwan
python -m pip install -r requirements.txt

Restart and hard-refresh the browser - the dynamic input sockets come from a frontend extension, so a stale tab shows you a node with the wrong number of sockets. Search Swwan in the node browser; no models or extra dependencies.

Where people get burned

Unconnected sockets quietly become black. Leave image_3 empty while inputcount is 3 and the node substitutes a zeros tensor - so instead of an error you get a wipe into pure black, then back out of it. If your clip randomly goes black for a moment, count the wires.

inputcount and your wires disagree. Lower the count after wiring and the extra links drop; raise it and new sockets appear unconnected. Check the count before queueing, especially after copy-pasting the node.

Frame count explodes. The output length is every input's full length plus transitioning_frames between each pair. Ten single images at 24 transition frames is a 216-frame batch, and each transition frame costs a mask composite plus a Gaussian over the mask. Blur is the expensive part; start at something like 4–10 and raise it only if you can see the difference.

It is not the batch node. If your images are already one IMAGE batch, use Transition Images In Batch (Swwan) and don't hand-wire N sockets. And if you need the reverse order, either set reverse or put Reverse Image Batch (Swwan) upstream - one of those will be the correct one, and guessing wrong gives you a transition running the wrong way.

CategorySwwan/Advanced/Image

Inputs (9)

NameTypeDefaultDescription
inputcountINT22–1000—
image_1IMAGE—
interpolationCOMBO8 options: linear, ease_in, ease_out, ease_in_out, bounce, elastic, +2
transition_typeCOMBO7 options: horizontal slide, vertical slide, box, circle, horizontal door, vertical door, +1
transitioning_framesINT22–4096—
blur_radiusFLOAT0.00–100—
reverseBOOLEANfalse—
deviceCOMBOCPU2 options: CPU, GPU
image_2optIMAGE—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—