Image Transform | Deforum
Camera moves for your frames, no video model required
- images
- IMAGE
The cheap way to get motion in animation: instead of generating every frame differently, generate once and move the image. Image Transform applies a translate, rotate, or scale to a batch of images - which is exactly the camera-motion primitive Deforum is famous for (the zoom/pan/rotate that made the original Deforum extension distinctive), exposed as a plain node you can run on any IMAGE.
It's the "Ken Burns" layer: a slow zoom into a generated still reads as a video cut without touching a video model. Pair it with the For Loop nodes and a per-frame value list and you've got a real camera path - panning across a scene frame by frame.
The inputs that matter
transform_type-translate,rotate, orscale. One at a time; stack two nodes if you want a pan and a zoom.x_value/y_value-FLOAT, default 0, range −1000 to 1000. For translate these are pixel offsets; for rotate,x_valueis the angle in degrees (around the image center) andy_valueis unused; for scale, each is a multiplier offset from 1.0 (so 0.1 = 110%).edge_mode- what happens at the borders:extend(stretch the edge pixels - the usual choice),wrap(tile),reflect(mirror), ornone(leave zeros/black).
The genuinely clever bit: x_value and y_value can be sequences - a list, tensor, or array. When they are, each frame uses the value at its index, clamped to the sequence length. That's the whole animation trick: drive the transform values per-frame and the node produces a smooth camera move with zero manual frame editing.
How it works
It builds a 3×3 affine matrix per frame (translation, rotation about center, or scaling about center), inverts it, and samples the source with bilinear interpolation via grid_sample - inverse warping, so you never get holes in the output. The whole batch is processed as tensors on your GPU if the input is there, which is why even a 500-frame batch is quick.
Gotchas
Rotation is degrees, not radians - a value of 360 isn't a full turn of smooth motion, it's a jump (values are static per frame unless you feed a sequence). And when you do feed a sequence, remember it's clamped, so a shorter list than your frame count just repeats the last value. Watch edge_mode: none gives black borders that will look like a mistake mid-animation, and wrap shows seams on most content - extend is the safe default.
Installing it
Ships in deforum-comfy-nodes, the official Deforum ComfyUI pack. ComfyUI Manager: search "deforum" (comfyui-deforum), install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/deforum-art/deforum-comfy-nodes
Restart ComfyUI after. No extra dependencies, no model downloads - torch's grid_sample does the work. If you hit load errors after upgrading, an orphaned deforum pip package is the usual culprit; pip uninstall deforum and restart.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| transform_type | COMBO | 3 options: translate, rotate, scale | |
| x_value | FLOAT | 0.0-1000–1000 | — |
| y_value | FLOAT | 0.0-1000–1000 | — |
| edge_mode | COMBO | 4 options: extend, wrap, reflect, none |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |