Nodes/ComfyUI-ZML-Image/ZML_图像旋转
ComfyUI Node

ZML_图像旋转

A rotate node that's honest about expanding the canvas

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_图像旋转
  • 图像
  • 旋转后图像
旋转方向
旋转角度90

ZML_ImageRotate (ZML_图像旋转) is exactly what its name says, and that's the point of this review: there is nothing clever hidden here, so you can decide in one paragraph whether you need it. It's a rotate node that takes an image, a direction, and an angle, and hands back a rotated image. It's the simplest node in this pack, and it's fine.

It ships in ComfyUI-ZML-Image, zml-w's 160+ node utility pack, tucked into the plain image subcategory alongside the crop and grid-split nodes.

How it works

The node converts your tensor to a PIL image, rotates it with bicubic resampling, and converts back. Two knobs:

  • 旋转方向 - clockwise (顺时针) or counter-clockwise (逆时针).
  • 旋转角度 - 0–360°, default 90.

Nothing exotic under the hood - no seam-aware rotation, no outpainting of the empty corners. And because it uses PIL's expand=True, the canvas grows to fit the rotated image instead of cropping corners off. Rotate a portrait 45° and you get a taller, wider image with transparent corners.

The one thing to remember

Rotating by anything that isn't a right angle changes the output dimensions. A 90° rotation flips width and height (1024×1536 becomes 1536×1024); a 45° rotation makes both bigger. If a downstream node expects a fixed size - an EmptyLatent, a batch, a video pipeline - put a resize or a crop after it, or stick to 90°/180°/270°. That's the entire trap, and it's the same trap every rotate node in the ecosystem shares.

Inputs and outputs

  • 图像 (IMAGE) in, 旋转后图像 (rotated image) out. That's the whole interface. It processes the first image of a batch, so feed it single frames or loop.

Installing it

You don't install this node alone; you install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

restart ComfyUI, or ComfyUI Manager → search "ComfyUI-ZML-Image". The pack drags in heavy requirements (OpenCV, scipy, ultralytics) for its other nodes; this one needs only core ComfyUI and downloads no models.

When you'd actually reach for it - and when not

Honest answer: if rotation is a frequent part of your pipeline, ComfyUI's stock ImageRotate/ImageFlip nodes do the same job without installing a 160-node pack, and flipping is usually what people actually mean by "rotate." This node's appeal is purely that it's already there once you've installed the pack - a native-feeling, direction-named rotation that's consistent with the pack's other image tools. If you're already running ZML nodes, use it. If you're installing this pack just for rotation, you're in the wrong place.

Categoryimage/ZML_图像/图像

Inputs (3)

NameTypeDefaultDescription
图像IMAGE
旋转方向COMBO2 options: 顺时针, 逆时针
旋转角度INT900–360

Outputs (1)

NameTypeDescription
旋转后图像IMAGE