Nodes/ccsun_node/Image Editing
ComfyUI Node

Image Editing

Pan, rotate and zoom an image without leaving the graph

By CC-SUN6·Created 2 years ago·Updated about a year ago· 0
Image Editing
  • image
  • mask
  • IMAGE
  • MASK
x0.00
y0.00
rotate0.0
scale1.00
interpolationbilinear

Sometimes you don't need a whole compositing pipeline - you just need to nudge an image over a bit, spin it a few degrees, and zoom in slightly, all before it hits the next node. That's the entire job of Image Editing, one of three tiny utility nodes in the ccsun_node pack. It's a basic affine transform (pan + rotate + zoom) packed into a single node, and it's genuinely handy for the "almost right, needs a small manual correction" moments you hit constantly in ComfyUI: repositioning a reference image before it goes into an IPAdapter or ControlNet, straightening a slightly tilted upload, or lining up a subject inside a canvas before you inpaint or outpaint it. Normally you'd chain a scale node, a rotate node and a crop node to do this. Here it's one node with four sliders.

How it works

It applies a standard affine transform to the image - translate, rotate, scale, in that order conceptually - and resamples the result using whichever interpolation method you pick. Nothing exotic under the hood; it's the same math Photoshop's transform tool runs, just exposed as ComfyUI widgets so you can wire it into a graph and reuse the exact settings across a batch.

The inputs that matter

  • image (required) - the picture you're transforming, wired in from a loader or an earlier step.
  • x / y - pan offset, each ranging from -1 to 1 in steps of 0.01, default 0 (centered). Think of it as a fraction of the image size rather than pixels: small nudges like 0.05 shift things subtly, pushing toward ±1 slides the content most of the way off one edge.
  • rotate - degrees, -180 to 180, default 0. Straightforward rotation around the center.
  • scale - zoom factor, 0.1 to 3, default 1 (no change). Under 1 shrinks the content within the frame, over 1 zooms in.
  • interpolation - nearest, bilinear, or bicubic, defaulting to bilinear. Bilinear is the safe all-purpose choice. Bicubic tends to look a touch sharper when you're zooming in; nearest keeps hard edges with zero blending, which matters if you're transforming something like a mask or pixel art rather than a photo.
  • mask (optional) - feed one in and it gets the same pan/rotate/zoom applied to it, so it stays perfectly aligned with the transformed image. This is the detail that makes the node useful for inpainting workflows: reposition a masked region and the mask moves with the content instead of you having to redraw it.

Outputs are just IMAGE and MASK - the transformed versions of whatever you fed in. Wire IMAGE into whatever consumes it next (a sampler's image-to-image path, a compositor, a preview node), and wire MASK downstream if you're feeding it into an inpainting node that needs a mask input.

Installing it

Easiest path is ComfyUI Manager: open the Manager, search for ccsun_node, install, restart ComfyUI. If it doesn't turn up there (small single-purpose packs sometimes lag behind the registry), do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/CC-SUN6/ccsun_node

Then restart ComfyUI. The pack's README doesn't list any Python dependencies or model downloads beyond ComfyUI's own core libraries, and there's nothing to fetch - this node does pure image-tensor math, no weights involved.

Things to know before you rely on it

This is a very small, single-author utility pack - the README is a couple of lines and some workflow screenshots, nothing more. That's not a knock, it means the node does exactly what it says and nothing else, but it also means there's no active support thread to lean on if something behaves unexpectedly. If you hit a bug, your best bet is opening a GitHub issue on the repo directly rather than searching for it - this one hasn't built up any real Reddit or forum footprint yet.

The one thing worth internalizing about the x/y range: since it's normalized rather than pixel-based, the same 0.1 nudge means a bigger visual shift on a small image than a large one. If your pan looks like it barely did anything, you're probably testing on a big canvas - bump the value up rather than assuming the node isn't working.

Categoryccsun_node

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
xFLOAT0.00-1–1
yFLOAT0.00-1–1
rotateFLOAT0.0-180–180
scaleFLOAT1.000.1–3
interpolationCOMBObilinear3 options: nearest, bilinear, bicubic
maskoptMASK

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK