Nodes/ComfyUI-seamless_latent_tiling/Seamless Offset Reverse ✦
ComfyUI Node

Seamless Offset Reverse ✦

The boring node that puts your seamless image back where it belongs

By mikemojen·Created 6 months ago·Updated 6 months ago· 0
Seamless Offset Reverse ✦
  • image
  • image
shift_y0
shift_x0

This node is boring on purpose, and that's a compliment. SeamlessOffsetForInpaint shifts your image 50% so the seams land in the middle where inpainting can fix them - but once that's done, something has to roll the image back, or your "seamless" output is just the same image rotated half a frame, which looks broken to anyone who tiles it. SeamlessOffsetReverse is that something.

How it works

It's a one-trick node: a torch.roll in reverse. The offset node rolled the image by half its height and width; this node rolls it back by exactly the negative amounts. Everything else - the inpainting you did in between - rides along untouched, and the result lands in its original position.

That's the whole mechanism. There's no magic, no interpolation, no quality loss. A roll is a roll.

Inputs and the one thing that matters

  • image - the inpainted (or otherwise processed) image that came from the offset node's pipeline.
  • shift_y / shift_x - these carry a forceInput flag, which is the one genuine gotcha to know: you cannot type numbers into them in the UI. You must wire them from SeamlessOffsetForInpaint's shift_y/shift_x outputs. That's deliberate - it guarantees the reverse always matches the offset exactly, even if you toggled offset_x/offset_y differently on the way in.

Output is a single image, ready for a save node.

How it fits the workflow

SeamlessOffsetForInpaint → shifted_image → VAE Encode → KSampler (inpaint)
                          seam_mask ─────────────────┘
                          shift_y, shift_x ──────→ SeamlessOffsetReverse → Save

You feed the reverse node the post-inpaint, post-decode image and wire the two shift values across. If the connection to those INTs breaks, they default to 0 - a silent no-op - and you'll get back a shifted image with no obvious error. That's the tell to look for: output that wraps around the edges means the shift values didn't make it through.

Install

Same pack as its siblings - ComfyUI Manager (search "ComfyUI-seamless_latent_tiling") or:

cd ComfyUI/custom_nodes
git clone https://github.com/mikemojen/ComfyUI-seamless_latent_tiling

Restart ComfyUI and it's under image/seamless. No extra dependencies, no model files.

Could you use a generic roll/offset node from another suite instead? Sure, if you want to do the half-dimension math yourself. The reason to use this one is that the shift values come straight out of the offset node - no arithmetic, no remembering which direction "positive" is. It's a two-widget node that exists to close the loop, and it does exactly that.

Categoryimage/seamless

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
shift_yINT0Connect from SeamlessOffsetForInpaint shift_y output.
shift_xINT0Connect from SeamlessOffsetForInpaint shift_x output.

Outputs (1)

NameTypeDescription
imageIMAGE