Rotate Image
Rotate an image by an angle in degrees
- image
- IMAGE
Rotate Image does exactly what it says: give it an image and an angle in degrees, and it returns the rotated result. No frills, no crop-to-fit toggle, no fill-color option in the schema - one input, one number, one output. If you need a quick rotation step tucked into a ComfyUI graph without leaving the app, this covers it.
Part of aria1th's ComfyUI-LogicUtils, a personal utility pack from the same handle behind the Illustrious XL training work - mostly math and logic helpers, with this as one of the few nodes in the pack that actually touches image data rather than pure values.
Why you'd reach for it
Real use cases skew practical rather than artistic: correcting a reference image that came in sideways before you feed it into a ControlNet or IP-Adapter preprocessor, building a batch of augmented training-style variations at fixed angles, or straightening a scanned/photographed input before further processing. If you're after generative "tilted camera angle" effects, that's a prompting or ControlNet job, not this node - this is a literal pixel rotation of whatever image you already have.
How it works
It rotates the input IMAGE by angle degrees and returns the rotated IMAGE. Since the schema gives you no separate width/height or canvas-size controls, the practical behavior to expect from any straightforward image rotation is one of two things: either the canvas expands to fit the whole rotated image (introducing new empty space at the corners) or it stays the original size and clips the corners - check the result at a non-90°-multiple angle on your own image once, since the pack's README doesn't document which behavior it picked, and it's the one detail worth confirming before you build a pipeline around it.
Inputs and outputs
image(IMAGE, required) - the image to rotate.angle(INT, default 0) - the rotation angle in degrees. At the default of 0, the image passes through unrotated.- Output:
IMAGE- the rotated image.
How to install it
ComfyUI Manager: search "ComfyUI-LogicUtils", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
then restart ComfyUI. No model downloads - this is a CPU-side (or lightweight GPU tensor) image transform, not a generative step, so it's fast and cheap regardless.
Common issues & troubleshooting
"Missing node type" on a shared workflow. ComfyUI Manager's "Install Missing Custom Nodes" installs the whole pack from the graph JSON.
Import error on startup. The README notes the pack's dependency auto-installer is opt-in: COMFYUI_LOGICUTILS_AUTO_INSTALL=1 before launch to let it install what's needed, or COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to disable that hook if it's causing the problem. Image rotation typically needs an imaging library (PIL/Pillow or similar) under the hood, so if this is the node throwing the import error, this env var is the first thing to try.
Corners get cut off, or unexpected blank space appears. As above - depending on how the canvas is handled, non-90°-multiple rotations either crop into the image or pad it with empty space. If you need a specific behavior (always-crop or always-pad), test at a small angle first and adjust your downstream crop/resize step to compensate rather than assuming.
Colors or transparency look off after rotation. If your source image has an alpha channel, confirm what fills the newly-exposed corner area - some rotation implementations fill with black, others with transparent, and that difference matters a lot if you're compositing the result afterward.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| angle | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |