Nodes/ComfyUI-VideoTransition/Video Cube Transition
ComfyUI Node

Video Cube Transition

The classic cube-flip cut — video2 rotates in as video1 spins away

By yichengup·Created 11 months ago·Updated 11 months ago· 25
Video Cube Transition
  • video1
  • video2
  • video
direction
total_frames60
fps30
rotation_angle90.00
cube_size300.00
perspective800.00
use_gpufalse
batch_size5
background_color#000000
width640
height640

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 - horizontal or vertical. 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) and perspective (500–2000, default 800) - size of the cube geometry and how strong the lens feel is.
  • total_frames (4–300, default 60) and fps (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.com behind 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_frames to ~30 and raise fps if you want snappy.
  • Cube looks flat or cramped - raise perspective toward 1200–2000 and nudge cube_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.
CategoryVideoTransition

Inputs (13)

NameTypeDefaultDescription
video1IMAGE
video2IMAGE
directionCOMBO2 options: horizontal, vertical
total_framesINT604–300
fpsINT3015–60
rotation_angleoptFLOAT90.0045–180
cube_sizeoptFLOAT300.00200–600
perspectiveoptFLOAT800.00500–2000
use_gpuoptBOOLEANfalse
batch_sizeoptINT51–20
background_coloroptSTRING#000000
widthoptINT640320–1920
heightoptINT640240–1080

Outputs (1)

NameTypeDescription
videoIMAGE