ComfyUI Node

SeamlessKSampler

A drop-in KSampler that runs the whole denoise on a donut

By moyi7712·Created 2 years ago·Updated about a year ago· 20
SeamlessKSampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
steps20
cfg8.0
sampler_name
scheduler
denoise1.00

If you've tried the "just prompt for a seamless pattern" route, you know the result: 90% of a great tile, plus one stubborn seam. SeamlessKSampler is the pack's moyi7712/ComfyUI_Seamless_Patten direct answer - a sampler node that is, interface-wise, a stock KSampler with a party trick: it flips every Conv2d layer's padding to circular for the entire denoise, so the model always works on a wrapped image and the edges can't disagree.

What it is

It's KSampler, reimplemented with one change. The same input list - model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise - and the same single LATENT output. Swap it in where your KSampler sits, and the padding swap happens around the exact same common_ksampler core ComfyUI's own sampler calls. Same samplers (all 44), same schedulers (all 9), same behavior otherwise.

The mechanism, and the trade-off vs SeamlessApply

Before sampling, the node walks the diffusion model and sets padding_mode = 'circular' on every Conv2d; circular padding wraps the feature maps so the left edge meets the right and the top meets the bottom. After common_ksampler returns, it walks back and restores each layer's original padding. That's the whole trick.

The difference from the pack's SeamlessApply: that node wraps only the first ~10% of the denoise (the structural phase) then reverts, which avoids oddities in fine detail. This one wraps every step - composition and detail both assume a toroidal world. That's more aggressive and can give slightly stronger wraparound in high-frequency detail, but it's also the simplest mental model: the whole generation is seamless, full stop. For game textures and fabric, where every pixel of the tile repeats, that's usually what you want.

The inputs that matter

For a beginner it's the same handful you set on any KSampler:

  • seed (INT) - reproducibility. Same seed, same steps, same tile.
  • steps (INT, default 20), cfg (FLOAT, default 8.0) - standard dials.
  • sampler_name (44 choices) and scheduler (9 choices) - DPM++ 2M / Karras is the boring-but-safe starting point for SD 1.5 / SDXL.
  • denoise (FLOAT, default 1.0) - 1.0 for a fresh generation; lower for img2img.

Everything else - model, positive, negative, latent_image - wires up exactly like the stock node. Output LATENT goes straight into VAEDecode.

Install

Same pack, no dependencies, no model downloads:

# ComfyUI Manager: search "Seamless" → Install → Restart
cd ComfyUI/custom_nodes
git clone https://github.com/moyi7712/ComfyUI_Seamless_Patten
# restart ComfyUI

Where people get burned

  • This node does not clone the model. Unlike SeamlessApply, it modifies the diffusion model's padding modes in place, then restores them after sampling. Normally that's fine - but if the run throws an error mid-sampling, the restore loop never executes and your model is stuck in circular-padding mode for the rest of the session. If outputs suddenly look off after a failed run, reload the checkpoint or restart ComfyUI. It's the one genuine footgun in the pack.
  • If detail looks too "wrappy," that's the all-steps circular doing its thing - drop back to SeamlessApply, which unwraps after the early phase.
  • SeamlessKSamplerAdvanced is the same node with KSamplerAdvanced's step controls, for img2img and multi-pass work. Use this one for simple single-pass texture generation.
CategorySeamless

Inputs (10)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1

Outputs (1)

NameTypeDescription
LATENTLATENT