ComfyUI Node

Translate

The move-it-by-pixels node (black fill included)

By isekai-sh·Created 9 months ago·Updated 8 months ago· 3
Translate
  • image
  • image
x_offset0
y_offset0

IsekaiTranslate shifts an image around the canvas by a pixel offset - left, right, up, down - and that's the entire job. It's the thinnest node in the pack's transform family, and it earns its place for exactly one reason: it's the building block you reach for when you want to reposition something without resizing or rotating it, and you want to know precisely how far it moved.

How it works. It takes your image and pastes it onto a new canvas of the same size at x_offset / y_offset. Positive x_offset moves the image right, positive y_offset moves it down; negatives go the other way. Anything that slides off the edge is clipped, and the space left behind is filled with flat black - there's no option for a different fill color, and no wrap-around. The output canvas is always the same size as the input, so a translate never changes your image dimensions, which is the predictable behavior you want in a graph where downstream nodes expect a fixed size. Zero offsets (both at 0) skip the work and pass the image through untouched.

Both offsets are integers from −8192 to 8192, and the node does the math in plain PIL. No models, no VRAM, milliseconds.

Inputs that matter. Three, all required:

  • image - the tensor you're moving.
  • x_offset - horizontal shift in pixels, negative = left.
  • y_offset - vertical shift in pixels, negative = up.

Output is a single image (IMAGE tensor). Where does a pure shift fit? Positioning a watermark or text overlay is the classic case - though honestly, the pack's Transform node does scale+translate together and is usually the better pick for that. The niche this node owns is data augmentation: translating images by a few pixels is a standard, cheap way to add positional variety to a training set, and a bare shift node like this is exactly what you want for it because it does nothing else. It also composes: chain two Translate nodes to move in two stages, or stack Translate after Rotate for a precise final position when the combined Transform node's baked-in order isn't what you need.

Install. Standard pack install: ComfyUI Manager → search "isekai" → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/isekai-sh/isekai-comfy-node
cd isekai-comfy-node
pip install -r requirements.txt

Restart; it's under Isekai → Image/Transform. No models, nothing heavy in requirements.txt.

Common issues. Two behaviors to remember, both by design. First, the vacated area is black: translate a bright image down by 100px and you get a black band across the top - if you need a different fill, this node can't do it, so crop, or move the image before compositing onto your own background. Second, the batch gotcha shared by every image node in the pack: it processes only the first image of a batch and returns a single image, which matters if you were hoping to translate a whole batch at once - loop per-image instead. And the usual silent-failure pattern: any error logs [Isekai] Translate Error to the console and returns the original unchanged, so "it didn't move" means check the console first, offsets second.

CategoryIsekai/Image/Transform

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
x_offsetINT0-8192–8192
y_offsetINT0-8192–8192

Outputs (1)

NameTypeDescription
imageIMAGE