Nuke Transform
Move, rotate, and scale images the Nuke way — no Nuke needed
- image
- IMAGE
You generated the perfect subject and it's sitting three pixels off where it needs to be, or slightly too big, or crooked. You could re-roll the prompt and pray. Or you could just nudge it, the way every Nuke compositor does, and move on with your life. That's what NukeTransform is for: clean 2D repositioning, rotation, scaling, and skew of an image, matching the behavior of Nuke's Transform node.
It sits in the "comp cleanup" tier of a workflow - the part where you stop generating and start placing. Slide a render onto its background, rotate a tilted plate straight, scale a foreground element to match a layer behind it, or add a slow push-in to a video frames pass. Once you've used it, the amount of images you'll accept as "close enough" drops dramatically.
How it works
It builds a 2D affine transform matrix in Nuke's order - translate to the pivot, scale, skew, rotate, translate back - then resamples the image with PyTorch's grid_sample. Outside the image, output is transparent, not black, so the result drops cleanly onto whatever's behind it.
Two details worth knowing. Rotation is counter-clockwise in degrees, and translate_y follows Nuke's convention: a positive value moves the image up, even though image coordinates grow downward. And the pivot point matters: center_x / center_y default to -1, which means "use the image center." Set them to actual pixel coordinates and rotation/scale spin around that point instead - handy for orbiting an element around a hinge.
The inputs that matter
Most of the list is dead simple:
translate_x/translate_y- move in pixels (remember: positive Y is up)rotate- degrees, counter-clockwise, −360 to 360scale- uniform multiplier; 1.0 is original sizescale_x/scale_y- non-uniform stretch, multiplied withscaleskew_x/skew_y- shear in degrees, withskew_order(XY or YX) controlling the ordercenter_x/center_y- the pivot;-1means image centerfilter- resampling filter; see the gotcha belowinvert- flips the whole transform, handy for un-doing one
The output is a single IMAGE at the same resolution as the input, transparent around the moved content. Wire it into a merge or straight into your save node.
The filter gotcha
Here's the trap, and it's in the source: filter offers eleven options - impulse, cubic, keys, simon, rifman, mitchell, parzen, notch, lanczos4, lanczos6, sinc4 - but the underlying grid_sample only actually does nearest and bilinear. Everything that isn't impulse (which maps to nearest) is currently sampled bilinearly. So the fancy Lanczos and Mitchell options don't give you the sharper results the names imply, at least not yet. Pick one and don't fight it; the practical difference on typical images is small.
Installing it
NukeTransform is part of the Nuke Nodes pack, so one install gets you all of these:
cd ComfyUI/custom_nodes
git clone https://github.com/sumitchatterjee13/nuke-nodes-comfyui.git nuke-nodes
cd nuke-nodes
pip install -r requirements.txt
Or search "Nuke Nodes" in ComfyUI Manager and restart. It appears under the Nuke category. The heavy dependency is OpenImageIO pulled in by requirements.txt - it's mostly used by the pack's Read/Write nodes, so if that install gives you trouble on your platform, the transform nodes themselves only really need the PyTorch that ComfyUI already ships.
Common issues
- It moved the image off-canvas and it vanished - the content is there, just outside the frame. The node keeps the output canvas the same size as the input, so a big translate pushes pixels out of view. Nudge it back or merge onto a larger background.
- Rotation is spinning around the wrong point - set
center_x/center_yto your intended pivot instead of leaving them at the center default. - Edges look slightly soft after a big scale-up - that's bilinear resampling doing its thing; scale in smaller steps or accept it for comp work.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| translate_x | FLOAT | 0-4096–4096 | — |
| translate_y | FLOAT | 0-4096–4096 | — |
| rotate | FLOAT | 0.0-360–360 | — |
| scale | FLOAT | 1.000.001–10 | — |
| scale_x | FLOAT | 1.000.001–10 | — |
| scale_y | FLOAT | 1.000.001–10 | — |
| skew_x | FLOAT | 0.0-89–89 | — |
| skew_y | FLOAT | 0.0-89–89 | — |
| skew_order | COMBO | XY | 2 options: XY, YX |
| center_x | FLOAT | -1-4096–8192 | — |
| center_y | FLOAT | -1-4096–8192 | — |
| filter | COMBO | cubic | 4 options: impulse, cubic, lanczos, area |
| invert | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |