Nodes/ComfyUI_FaceAlignPaste/Image Rotate @ CHAOS
ComfyUI Node

Image Rotate @ CHAOS

A rotate that doesn't slice your corners off

By CHAOSEA·Created about a year ago·Updated about a year ago· 24
Image Rotate @ CHAOS
  • image
  • IMAGE
angle0.0
backgroundwhite

Image Rotate @ CHAOS is the pack's utility node, and it's honest about being one. One image in, one image out, no detection, no models, no prompts - it just rotates a picture and, importantly, does it the way you actually want. The default rotate in a lot of image software keeps the canvas fixed and clips the corners, which is fine for a 90° turn and awful for a 15° straightening job. This node expands the canvas to fit the rotated image, so nothing gets lopped off, and fills the newly exposed area with a background color you choose. If you're correcting a tilted face before feeding it to a Face Align or AutoFit node, that's the whole game.

How it works

Under the hood it's a PIL rotation with interpolation: the node sizes a new canvas to contain the rotated bounding box, centers the image in it, rotates about the center, and fills the gaps with the background color (white, black, or gray). The README describes it as keeping the face center intact and using high-quality interpolation, which checks out - the rotate is done at full precision and the result is converted back to a tensor for ComfyUI.

Inputs and outputs

There are exactly three inputs and none of them are mysterious:

  • image (IMAGE) - what you're rotating.
  • angle (FLOAT, −360..360, step 0.1) - the rotation amount. Positive values rotate counter-clockwise, PIL-style.
  • background (enum: white, black, gray) - the fill for the exposed corners.

The single output is the rotated IMAGE. That's the whole node. If you need a rotation where you don't want the canvas to grow, you'd still be better off with a crop or a different tool, because this one's whole reason to exist is the non-destructive, expanded-canvas behavior.

Installing it

It ships with the rest of the pack - one install gets you all eight nodes. ComfyUI Manager → search ComfyUI_FaceAlignPaste, or:

cd ComfyUI/custom_nodes
git clone https://github.com/CHAOSEA/ComfyUI_FaceAlignPaste

Restart and you're done. Unlike the face nodes in this pack, this one doesn't lean on insightface, dlib, or any model downloads - the heavy dependencies are there because the pack installs as a whole, but a pure rotate shouldn't trip any of them.

Gotchas

  • The canvas changes size. Any non-90° rotation that fits fully adds a border. That's the feature, but it means the output dimensions won't match the input - worth knowing if something downstream expects the same resolution.
  • Direction takes a second to internalize. Positive angle goes counter-clockwise, which catches people rotating the "wrong way" once. Rotate a test frame and see.
  • Not a face-fixer on its own. It corrects the image's tilt; it won't straighten a face that's crooked inside the frame. For that you want the align nodes it pairs with.
Categoryimage/transform

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
angleFLOAT0.0-360–360
backgroundCOMBOwhite3 options: white, black, gray

Outputs (1)

NameTypeDescription
IMAGEIMAGE