Nodes/ComfyUI-MakeSeamlessTexture/Seamless Texture Half Shift
ComfyUI Node

Seamless Texture Half Shift

The Photoshop offset filter, done properly — no inpainting required

By SparknightLLC·Created 7 months ago·Updated 7 months ago· 26
Seamless Texture Half Shift
  • image
  • texture
inner_radius0.70
outer_radius1.00
blend_curvelinear
orientationboth

The classic way to make an image tileable is the Photoshop "offset" trick: shift the image by half its size so the seam lands in the middle, then patch the ugly joint. In the ComfyUI world that usually becomes "half-shift the image and inpaint the seam" - which is honestly the top answer whenever someone asks how to make a repeating pattern. It works, but it needs a model, a prompt, and a few attempts.

Seamless Texture Half Shift does the deterministic, model-free version. It rolls the image by half - which moves the original's continuous center content to the edges, so the edges suddenly match - and then blends the original with the rolled copy across a controlled zone so there's no abrupt jump. No inpainting, no prompt, no randomness. If your source image is half-decent, this gets you a tile in one pass.

How it works

It's torch.roll by w // 2 and/or h // 2 pixels, depending on orientation. Then a blend mask is built from normalized axis distances - for "both" it's the max of the two axis distances, giving a rounded-square blend region rather than an ellipse (that's the difference between this and the Radial Mask sibling). inner_radius marks where blending starts, outer_radius where it finishes, and blend_curve applies easing to the transition. Original survives in the center; the shifted copy takes over toward the edges.

The inputs that matter

  • orientation (default both) - set horizontal or vertical for one-axis tiling. This is the node's party trick: make a wallpaper that tiles down a wall, or a floor that tiles left-right, without touching the other axis.
  • inner_radius (default 0.7) - raise it to keep more of the original center unblended.
  • outer_radius (default 1.0, can exceed 1) - how far the blend reaches.
  • blend_curve - linear (default) is the hard edge; cosine, smoothstep, smootherstep give progressively softer transitions. smootherstep is the smoothest if the seam refuses to hide.

Output is a single IMAGE (texture) - feed it to Seamless Texture Tiled Preview to actually check the seam, or straight to Save Image.

Installation

No models, no extra pip packages - just torch, which ComfyUI already ships:

cd ComfyUI/custom_nodes
git clone https://github.com/SparknightLLC/ComfyUI-MakeSeamlessTexture

or install "ComfyUI-MakeSeamlessTexture" via ComfyUI Manager. Restart, done.

Common issues

  • A soft, ghosted patch in the middle. That's the blend zone - the output is a mix of the original and its shifted copy, and the widest part of that zone sits mid-image. Raise inner_radius to shrink it.
  • Seam still visible. The technique can't invent content that isn't there. If your source has a strong gradient or a unique detail at the edge, run Seamless Texture Pre-Processor first to flatten the lighting, or generate a better source.
  • Corners getting hammered. On "both", the rounded-square mask replaces corner detail more aggressively than edge-midpoint detail. If that's ruining a feature, the Radial Mask node's elliptical falloff usually behaves better.
Categoryimage/texture

Inputs (5)

NameTypeDefaultDescription
imageIMAGEImage to make seamless using a half shift.
inner_radiusFLOAT0.700–1.5Normalized distance where blending starts. 0 = center, 1 = edge.
outer_radiusFLOAT1.000.1–2Normalized distance where blending ends. Values > 1 extend blending beyond edges.
blend_curveCOMBOlinearBlend curve for the transition at the seams.
orientationCOMBObothShift direction: both axes, horizontal only, or vertical only.

Outputs (1)

NameTypeDescription
textureIMAGE