Video Cube Transition
The classic cube-flip cut — video2 rotates in as video1 spins away
- video1
- video2
- video
You know this one from every PowerPoint and every tech launch video: the whole frame is a cube, it rotates, and what you were watching becomes the side of the cube while the next clip is revealed on the face coming around. It's a bit of a cliché, which is exactly why it's useful - it's the recognizable "premium video editor" move, and it's what most people who search for a cube transition in ComfyUI actually want. This node is that: one clip rotating away, the other rotating in.
How it works
Video Cube Transition is the two-clip, Chromium-rendered version of the pack's cube trick. video1 and video2 get baked onto the sides of a CSS 3D transform cube, and a headless Chromium (Playwright) animates the rotation while screenshotting each frame back into an IMAGE tensor. direction picks a horizontal or vertical spin; rotation_angle (45–180, default 90) decides how far the cube turns - 90 is the clean swap, 180 is a full half-flip that reverses. Because it's real browser 3D, the perspective is solid rather than faked with warping.
Inputs and outputs that matter
video1,video2- the two clips. Frames are sampled by progress, so unequal lengths are fine.direction-horizontalorvertical. Choose this before anything else; it's half the look.rotation_angle(45–180) - 90 (default) for the standard flip, more for an exaggerated turn.cube_size(200–600, default 300) andperspective(500–2000, default 800) - size of the cube geometry and how strong the lens feel is.total_frames(4–300, default 60) andfps(default 30) - 60 frames at 30fps = a 2-second flip, which is already slow for this effect; consider 24–30 frames.use_gpu(off by default),batch_size(rendering batching),background_color,width/height(up to 1920×1080 here - the smaller cap of the Chromium nodes).
Output is video - an IMAGE batch; combine it with VHS_VideoCombine or ImageBatch to export.
Installing it
Same pack, same drill. ComfyUI Manager → search "VideoTransition", or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-VideoTransition
cd ComfyUI-VideoTransition
pip install -r requirements.txt
playwright install chromium
The Chromium install is required - no browser, no cube.
Common issues
- Runtime crash about Chromium - you skipped the browser install.
playwright install chromium(mirror flag--mirror=https://registry.npmmirror.combehind the GFW). - Flip feels too long - this is the most common stumble: 60 frames at 30fps is a full two seconds of spinning. Drop
total_framesto ~30 and raisefpsif you want snappy. - Cube looks flat or cramped - raise
perspectivetoward 1200–2000 and nudgecube_size; defaults are tuned to be safe, not pretty. - Garbage at 1920+ - width/height cap at 1920×1080 for this node; if you need 4K, render at 1080 and upscale the output, or use the resolution-flexible pure-Python nodes in the pack.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| video1 | IMAGE | — | |
| video2 | IMAGE | — | |
| direction | COMBO | 2 options: horizontal, vertical | |
| total_frames | INT | 604–300 | — |
| fps | INT | 3015–60 | — |
| rotation_angleopt | FLOAT | 90.0045–180 | — |
| cube_sizeopt | FLOAT | 300.00200–600 | — |
| perspectiveopt | FLOAT | 800.00500–2000 | — |
| use_gpuopt | BOOLEAN | false | — |
| batch_sizeopt | INT | 51–20 | — |
| background_coloropt | STRING | #000000 | — |
| widthopt | INT | 640320–1920 | — |
| heightopt | INT | 640240–1080 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | IMAGE | — |