Nodes/ComfyUI-Practical-Tools/Image Transform Rotate
ComfyUI Node

Image Transform Rotate

Rotate a scan without the jaggies

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Image Transform Rotate
  • images
  • IMAGE
angle35.0
expand
SSAA4
method

A slightly tilted scan, a photo shot three degrees off level, a batch of frames that all need the same rotation - this is the node for it. Image Transform Rotate rotates images by an arbitrary angle with a real quality control knob, and it's the rare rotation node that actually cares about the result looking clean.

The quality story is SSAA - supersampling. Before rotating, the node upscales the image by that factor (default 4×), rotates the enlarged version, then downsamples back. That's the classic anti-aliasing trick: rotate in higher resolution, and the resampling artifacts that would normally chew up edges at 35° mostly disappear. Set SSAA to 1 and you get the fast, jaggy version; 4 is the sweet spot for most work; crank it to 8 or 16 for a critical rotation where you can wait. The method dropdown picks the resampling filter (lanczos is the sensible default) and expand decides whether the canvas grows to fit the rotated corners or stays put and lets them clip.

Two behaviors to internalize. angle of 0 or 360 short-circuits to a straight passthrough - no re-encode, no degradation, so you can leave a rotation node in the graph permanently without paying for it. And the filled corners are transparent black, which matters: if you rotate a square image with expand on, you get a diamond with clear corners, and anything downstream that expects an opaque image will show black (or whatever the next node does with transparency). The input is a full batch, so all frames rotate together.

Inputs and outputs that matter

  • images (in) - one image or a batch, rotated frame by frame.
  • angle (in) - degrees, default 35 (odd choice, but fine). Negative angles rotate the other way.
  • expand (in) - true = grow the canvas so nothing clips; false = keep the original bounds.
  • SSAA (in) - supersampling factor, 1–16, default 4. This is your quality/speed trade-off.
  • method (in) - resampling filter, lanczos default.
  • IMAGE (out) - the rotated result.

Installing it

Part of wenchengxiang/ComfyUI-Practical-Tools. ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Practical-Tools" → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools

then restart. No pip dependencies, no models - pure Python over PIL, already in ComfyUI.

Issues and gotchas

SSAA is the knob that bites. Forgetting it exists and leaving the default is fine; the trap is the opposite - people crank it to 16 "for quality" on a 4K image and wonder why the node takes a minute. The other one is the transparent corners: after a 45° expand rotation you're holding a diamond, and if you feed that straight into a sampler you'll get black (or hallucinated) corners. Pad or fill before rotating, or rotate with expand off and crop. For the common "my scan is 2° off" job, angle −2, expand on, SSAA 4, and you're done.

CategoryPractical-Tools/Image

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
angleFLOAT35.0
expandCOMBO2 options: true, false
SSAAINT41–16
methodCOMBO6 options: lanczos, bicubic, hamming, bilinear, box, nearest

Outputs (1)

NameTypeDescription
IMAGEIMAGE