Nodes/comfyui_quilting/Latent Seamless Quilting MP
ComfyUI Node

Latent Seamless Quilting MP

Make a texture tile without ever leaving latent space

By bmad4ever·Created 2 years ago·Updated about a year ago· 10
Latent Seamless Quilting MP
  • src
  • lookup
  • LATENT
oriH
block_size18
overlap0.20
tolerance0.10
seed0
version3
blend_into_patchfalse

The seamless image nodes fix the wrap seam on pixels. This one fixes it on latents - before you ever decode. Same H/V/H&V seam-removal as the image MP node, but the patching happens on the 8×-smaller latent tensor, so it's fast, and the seam is already gone by the time you sample or decode.

When to reach for it

Two setups, both in the pack's example workflows. The clean one: sample a small texture, make it seamless with this node, then decode - a tileable texture in one pass, no cleanup after. The sneaky one: make the latent seamless, then run seamless (periodic) sampling so the model never has to invent content across a boundary. If you've fought tiling artifacts before - those visible seams every repeat in your background texture - this is the classical solution to the problem, applied where it's cheapest.

How it works

It's the same stitching as the image version: patches of block_size are cut from the source (or your optional lookup latent) and placed with overlapping edges, with a minimum-cut path hiding each joint. MP rebuilds the transition strip from many small overlapping square patches, which is what makes it work without a lookup on intricate textures. It patches vertical seams first, horizontal after, and mops up the corner with two square patches.

Inputs that matter

  • src (LATENT), ori (H / V / H & V).
  • block_size - default 18, min 3, and there's no auto-guess on latents. Remember it's in latent pixels: real pixels divided by 8.
  • overlap - capped at 50% like every seamless node; the cap is where two overlaps meet, and the README warns you not to actually use it.
  • tolerance - MP's pattern-variation dial.
  • seed, plus version and blend_into_patch if you want the more modern patch matching.
  • lookup (optional LATENT) - draw patches from a different texture than src.

Output is one LATENT - wire it to a VAE Decode or into a sampler.

If you have a strong lookup latent and want the fast single-block approach, that's the SP sibling's job. MP is the reliable default.

Installing

Same pack, same steps: ComfyUI Manager → search comfyui_quilting, or

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_quilting
python -m pip install -e /path/to/ComfyUI/custom_nodes/comfyui_quilting

Restart, done. No model files anywhere in this pack - the only optional install is pyastar2d, and everything works fine without it.

CategoryBmad/CV/Quilting

Inputs (9)

NameTypeDefaultDescription
srcLATENT
oriCOMBOH3 options: H, V, H & V
block_sizeINT183–512
overlapFLOAT0.200.1–0.5
toleranceFLOAT0.100–2
seedINT00–18446744073709550000
versionINT31–3
blend_into_patchBOOLEANfalse
lookupoptLATENT

Outputs (1)

NameTypeDescription
LATENTLATENT