ComfyUI Node

Cube Rotation

Spin your frames on a 3D cube — the showpiece node in the VideoTransition pack

By yichengup·Created 11 months ago·Updated 11 months ago· 25
Cube Rotation
  • images
  • video
rotation_style
rotation_speed1.0
duration5.0
fps30
background_color#1a1a2e
width640
height640
cube_size0.60
perspective1000.00

This is the node the pack is built around, and it's the odd one out: it's not a transition between two clips at all. Give it up to six frames (or images, or short clips' worth of stills) and it pastes them onto the six faces of a 3D cube, then rotates the cube however you like. Think intro card, a character-sheet carousel, or "six frames from my generation shown off as one spinning object." The author demoes it as the pack's flagship because it shows off the whole gimmick: this pack renders effects in a real browser engine instead of faking 3D with math.

How it works

Under the hood this is the Chromium branch of the pack. Your images are converted to base64 PNGs, stuffed into an HTML page that builds a CSS 3D transform cube, and a headless Chromium (driven by Playwright) renders the scene frame by frame and screenshots each one back into a ComfyUI IMAGE tensor. That's why the perspective looks genuinely solid - it's the browser's actual GPU-accelerated CSS3 3D, not a projective trick. If you feed fewer than six images it duplicates/tiles what you gave it to fill the faces, and it only uses the first six.

Inputs and outputs that matter

  • images - the batch of frames. This is the one input that matters most; a normal IMAGE tensor works, and it grabs the first six frames to texture the cube.
  • rotation_style - the fun dial: x_axis, y_axis, z_axis, diagonal, random_spin, or cube_unfold (which literally unfolds the cube flat, an easy way to end an intro into your actual footage).
  • rotation_speed (0.1–5), duration (seconds, 1–30) and fps (15–60) set how fast it spins and how long the clip is.
  • Optional: cube_size (0.3–1), perspective (500–3000, higher = more "lens"), background_color, and width/height to control output resolution.

The single output is video - a batch of frames. That's not a file; wire it into a combiner like VHS_VideoCombine (or ImageBatch → a save node) to actually get an mp4.

Installing it

Same story as the rest of the pack. Easiest is ComfyUI Manager → search "VideoTransition", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-VideoTransition
cd ComfyUI-VideoTransition
pip install -r requirements.txt
playwright install chromium   # the non-negotiable bit for THIS node

Restart ComfyUI, find it under the VideoTransition category.

Common issues

  • "Playwright not installed" warning or a crash at runtime - this node can't run without Chromium. The pip install and playwright install chromium steps aren't optional here. If you're behind the Great Firewall, use the mirror: playwright install chromium --mirror=https://registry.npmmirror.com.
  • Slow render at high settings - it's screenshotting a browser hundreds of times. Drop fps or duration, or render smaller and upscale later.
  • OpenCV ImportError - the pack's requirements.txt doesn't list opencv-python, but ComfyUI bundles it. If you're running nodes in a bare Python env, pip install opencv-python.

The author, yichengup, is a prolific Chinese node dev (ComfyUI-Ycanvas, Comfyui_Redux_Advanced are his too), so this pack is a real project, not a one-off dump - but it's young, so expect rough edges on the edges.

CategoryVideoTransition

Inputs (10)

NameTypeDefaultDescription
imagesIMAGE
rotation_styleCOMBO6 options: x_axis, y_axis, z_axis, diagonal, random_spin, cube_unfold
rotation_speedFLOAT1.00.1–5
durationFLOAT5.01–30
fpsINT3015–60
background_coloroptSTRING#1a1a2e
widthoptINT640640–3840
heightoptINT640360–2160
cube_sizeoptFLOAT0.600.3–1
perspectiveoptFLOAT1000.00500–3000

Outputs (1)

NameTypeDescription
videoIMAGE