Nodes/Difforum/Difforum · Camera (keys)
ComfyUI Node

Difforum · Camera (keys)

Type the Move Instead of Drawing It

By chillithebillis·Created 4 months ago·Updated 11 days ago· 10
Difforum · Camera (keys)
  • params
  • audio
  • camera
  • cycle_frames
  • info
◄keys0: zoom_in 0.6 0.5 40 ease_in_out 30: pan_right 1.0 0.8 40 ease_in_out 60: spiral 1.4 1.1 55 ease_in 90: zoom_out 0.5 0.45 40 ease_out►
◄camera_mode2d►
◄transition1.00►
◄speed1.00►
◄loop_modeoff►
◄cycle_frames0►
◄harmonics3►

Difforum's headline feature is the Director timeline, and it's good. But there are times when a text box beats a mouse: you already know the move, you want it in version control, or you're stacking eleven keys and dragging each one is misery. This is the Director's camera track in text form, and it writes the identical thing.

The syntax

One key per line:

frame: move [speed] [intensity] [lens] [ease]

Which looks like this in practice, out of the node's own default:

0: zoom_in 0.6 0.5 40 ease_in_out
30: pan_right 1.0 0.8 40 ease_in_out
60: spiral 1.4 1.1 55 ease_in
90: zoom_out 0.5 0.45 40 ease_out

Moves come from the pack's 25 presets - the basic set (zoom_in/out, pan_*, roll_*, still), the space set (dolly_in/out, orbit_left/right, tilt_*, rise, crane_up, dolly_zoom), and the effects set (spiral, vortex, sway, breathe, drift, handheld, shake). Frames can be written as 2.5s if you think in seconds rather than frames, and a typo'd move name raises an error listing the valid ones instead of silently doing nothing.

The knobs that shape the path

  • transition (default 1.0) - how much each key eases into the next. 1.0 gives you one continuous crane move; 0 gives hard cuts at every key. This single slider is what separates "camera op" from "slideshow", and most beginner work looks wrong because it's set to something in between by accident.
  • speed - a master multiplier on every key. Dropping it to 0.5 is how you fix a move that's too fast without retyping numbers.
  • camera_mode - 2d for flat moves, 3d for parallax with a depth map. In 3D, moves that describe motion through space (dolly, orbit, crane) are the ones that need depth; pan and roll are in-plane and don't care.
  • loop_mode with cycle_frames and harmonics - the interesting one. harmonic or zero_mean make the whole path periodic over cycle_frames, so the clip loops without a crossfade. That's for installations and VJ loops, and it's a genuinely different way to author a camera: instead of a beginning and an end you get a closed orbit. harmonics controls how many sine terms describe the path - more terms track your keys closely, fewer give a smoother loop. cycle_frames 0 means the whole clip is one cycle, and the value is also emitted as an output to feed the Loop node's settled-lap check.

audio takes the Audio Analyzer's wire so keys can react to loudness, bands and beats.

Outputs

camera, cycle_frames and info. camera plugs into Feedback Sampler, Guide Frames, Storyboard, Camera → Prompt or Camera Export. Wherever you'd put the Director's direction wire, you can put this instead - it overrides just the camera and leaves the rest alone. That's the pattern worth internalising: direction is everything, camera is the move.

Install

Manager → search "Difforum", or:

cd ComfyUI/custom_nodes && git clone https://github.com/chillithebillis/Difforum.git difforum

Restart. Pure Python and numpy - no extra wheels, no model files.

Where people get burned

Keys are frames, not seconds, unless you write the s suffix - and a 24 fps clip with a key typed at 900 is a much longer shot than you meant. The other one is transition 0 with keys two frames apart, which produces a strobing mess that people then blame on the sampler. Space the keys out, or leave transition at 1 and let the engine blend.

And if a 3D move looks flat, check for a depth map before you blame the preset. The report will tell you it fell back to pseudo-3D; the render won't.

CategoryDifforum/2 · Direction

Inputs (9)

NameTypeDefaultDescription
paramsDIFFORUM_PARAMSFrom Setup: frame count, fps, width and height. Plug the same Setup everywhere.
keysSTRING0: zoom_in 0.6 0.5 40 ease_in_out 30: pan_right 1.0 0.8 40 ease_in_out 60: spiral 1.4 1.1 55 ease_in 90: zoom_out 0.5 0.45 40 ease_outOne key per line: frame: move [speed] [intensity] [lens°] [ease]. e.g. '48: orbit_right 1.2 0.8 35 ease_in_out'. Frames can be '2.5s'.
camera_modeCOMBO2d2d = flat moves; 3d = parallax with a depth map.
transitionFLOAT1.000–11 = moves blend into each other; 0 = hard cuts at each key.
speedFLOAT1.000–5Master speed on every key.
loop_modeCOMBOoffharmonic / zero_mean make the path periodic over cycle_frames, so the clip loops with no crossfade (installations). off = free path.
cycle_framesINT00–100000Frames per loop. 0 = the whole clip is one cycle. Feeds Loop 'keep settled lap'.
harmonicsINT31–16harmonic loop: how many sine terms describe the path. More = closer to the keys, fewer = smoother loop.
audiooptDIFFORUM_AUDIOFrom Audio Analyzer: per-frame loudness, bands and beats.

Outputs (3)

NameTypeDescription
cameraDIFFORUM_CAMERA—
cycle_framesINT—
infoSTRING—