Nodes/Universal Seamless Tiles/Seamless Tile Model (DiT)
ComfyUI Node

Seamless Tile Model (DiT)

The circular-padding trick is dead, and this is the replacement

By OliverCrosby·Created 2 months ago·Updated 2 months ago· 14
Seamless Tile Model (DiT)
  • model
  • MODEL
tiling
seed0

You know the classic seamless-texture trick from the SD1.5/SDXL days: swap every Conv2d's padding to circular, generate, and your texture tiles perfectly. If you've tried that on Flux and gotten nothing - no seam, but also no tiling, just a normal image - you're not doing it wrong. The trick genuinely stopped working. Transformer / DiT models like Flux and Wan patchify the latent with a Linear or a non-overlapping conv, so there's no conv padding left for the old nodes to grab. The community's workarounds were ugly: offset the image 50%, inpaint the seam, then re-upscale and watch a new seam appear, or hunt down a "seamless LoRA" that kind of helps. This node is the cleaner answer.

How it works

SeamlessTileModelDiT doesn't touch padding at all. Instead it wraps the model's UNet function (via set_model_unet_function_wrapper) so that every sampling step rolls the latent by a per-step offset, runs the denoiser, and rolls the result back. Because the canvas is being shifted around under the model's feet, no fixed edge can ever lock in - the model is effectively forced to treat the image as periodic. Two details make it work instead of falling apart:

  • The roll offsets are keyed on the seed and the current timestep, so within one step the cond and uncond passes roll identically. If they didn't, CFG would be combining misaligned predictions and you'd get mush.
  • The roll magnitude tapers with noise level. Early, high-sigma steps get big structural rolls that establish tileable structure; the final detail steps barely roll at all, so any wrap artifact collapses onto the true edge - where the companion MakeCircularVAEDiT node handles it in the VAE - instead of leaving a faint line through the middle of your image.

The inputs that matter

There are only three inputs and they're all easy. model takes any diffusion model - SD, SDXL, Flux, Wan, whatever. tiling is the one you'll actually change: enable tiles both axes, x_only/y_only tile a single axis (great for panorama-style strips), disable returns the model untouched. seed just makes the per-step offsets reproducible, so the same seed gives you the same tiling pattern run to run.

Wiring it in

The output is a MODEL - wire it between your checkpoint loader and your KSampler. Pair it with MakeCircularVAEDiT on the VAE and set both to the same tiling mode; the model node kills the latent-level seam, the VAE node kills the pixel-level one. To verify, offset your output by 50% in x or y and check that no seam shows.

Install

Install is trivial because this pack has zero dependencies - no requirements.txt, no model downloads, just a .py file. ComfyUI Manager: search "Universal Seamless Tiles". Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/OliverCrosby/ComfyUI-Universal-Seamless-Tiles

then restart ComfyUI.

Notes & gotchas

Where people get burned: latent rolling is very good but not conv-perfect - it averages across steps, so quality scales with step count. On turbo / few-step models expect a slightly softer result unless you bump to 15–20 steps. And it deliberately does not roll ControlNet hints or other spatial transformer_options, so don't expect tiling + ControlNet to align. It's an MIT-licensed, single-commit pack from Oliver Crosby, so it's young and lean - but for "I just want a tileable texture out of Flux without inpainting seams," it's the one I'd reach for.

Categoryconditioning

Inputs (3)

NameTypeDefaultDescription
modelMODEL
tilingCOMBO4 options: enable, x_only, y_only, disable
seedINT00–18446744073709550000

Outputs (1)

NameTypeDescription
MODELMODEL