Nodes/Akatz Seamless Tiling/Akatz Offset Image
ComfyUI Node

Akatz Offset Image

The classic offset trick, as a node

By akatz-ai·Created 3 months ago·Updated 2 months ago· 2
Akatz Offset Image
  • pixels
  • IMAGE
x_percent50
y_percent50

This is the oldest trick in the seamless-texture book, packaged as a node. Take any image, shift it by half its width, and let the edges wrap around. The seam that used to run down the middle is now at the edges - where you can inpaint it away, or hand it to a ControlNet, or just bake it. Offset first, fix the seam, offset back, done. Akatz Offset Image does the first and last step for you in one tiny node.

It earns its keep in two kinds of workflows. The classic one is texture repair: you have an image with a visible seam (or a model output that almost tiles but not quite), you offset it so the bad edge is front and center, inpaint or regenerate that strip, and offset back for a clean tile. The other is preview - before you commit to a full seamless pipeline, offset the image and glance at the result; if the seam is invisible, you've already won.

How it works

It's a roll, not a crop. The node uses torch.roll on the image tensor, which shifts pixels along an axis and wraps the overflow around to the other side. No pixels are lost and no pixels are added - the image is the same size before and after, just cyclically shifted. That wrap-around behavior is the entire point: it moves the discontinuity to wherever you want it without discarding information.

The two inputs are percentages, which is a nice touch:

  • x_percent - horizontal shift, 0 to 100. 50 = half the image width, the classic offset.
  • y_percent - vertical shift, same scale. 50 = half the height.

Both default to 50, which is the "put the seam in the middle of the frame" sweet spot you actually want. You can also use the node just to test tiling: offset, look, and if the center seam is gone, your texture loops.

Output is IMAGE, same size, same channel count, drop-in for whatever preview or processing node you had after it.

Install

It's part of the Akatz Seamless Tiling pack, so the install is the same as the rest of the family:

cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Seamless-Tiling

Restart ComfyUI (or use ComfyUI Manager and search "Akatz Seamless Tiling"). No models, no API keys - the pack's deps are numpy and opencv-python-headless.

Troubleshooting

  • The image shifted, but nothing wrapped around - that's a crop, not an offset; this node rolls. If your workflow needs a crop-shift (where edges are lost and filled), that's a different node entirely.
  • "Which direction is 50%?" - doesn't matter. Half the width is half the width; a 50% roll is its own inverse, so rolling twice gets you back to the original pixel-for-pixel. That's what makes the offset-inpaint-offset loop so clean.
  • Seam still visible after the first offset - that's normal; the whole point is that you then inpaint or regenerate the center strip. The node is step one of a two-step dance, not the whole choreography.
CategoryAkatz Seamless Tiling/Image

Inputs (3)

NameTypeDefaultDescription
pixelsIMAGE
x_percentFLOAT500–100
y_percentFLOAT500–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE