Nodes/tiled_ksampler/Asymmetric Tiled KSampler
ComfyUI Node

Asymmetric Tiled KSampler

The asymmetric tile trick for panoramas and textures

By FlyingFireCo·Created 3 years ago·Updated 2 years ago· 103
Asymmetric Tiled KSampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
tileX1
tileY1
steps20
cfg8.00
sampler_name
scheduler
denoise1.00

Ever generated a "seamless texture" and still seen the seam where the two edges meet? That's normal zero padding doing its job: the model looks past the border as if nothing were there, so the left edge has no idea what the right edge looks like. This node is the fix. It's a drop-in KSampler from the tiled_ksampler pack that wraps the image edges during sampling - but instead of forcing all four edges to match, you pick which direction tiles. That choice is the whole point.

What it's actually for

The asymmetry is what makes this useful beyond plain "seamless texture" work. Turn tileX on and your left edge will match your right edge, while the top and bottom stay normal boundaries. That's exactly what you want for a 360° scene or a long horizontal panorama, where the image is meant to wrap around a cylinder and the top and bottom really are edges. Turn tileY on instead and you get vertical repeat - think a strip of floor or wallpaper that tiles up and down. Both on gives you a fully tileable texture you can repeat in every direction, like the kind you'd drop into a game engine or Photoshop.

The author's own framing in the README is simply "when tileX = 1 it will tile in the X direction." This is a port of the asymmetric-tiling-sd-webui extension from the A1111 world, which is where the trick originally spread.

How it works

The mechanism is one of those "oh, that's clever" moves that reads scarier than it is. The node walks every convolution layer in the loaded UNet, splits each layer's padding into an X half and a Y half, and swaps in a forward pass that pads the X direction with circular padding and the Y direction normally (or the reverse, depending on your toggles). Circular padding means that when a convolution needs values beyond the border, it wraps around to the opposite edge - so the model believes the image continues on the other side. Then it runs the exact same sampling routine the core KSampler uses, and restores every convolution to normal afterward. That last bit is worth noting: unlike the sibling Tiled KSampler in this pack, this node cleans up after itself, so it doesn't leave your model mutated.

The inputs that matter

Everything here is a standard KSampler knob - model, latent_image, positive, negative, sampler_name (all 34 samplers), scheduler (all 9), steps, cfg, seed, denoise. The two you actually need to think about are the ones nobody else has:

  • tileX (0 or 1, default 1): wrap horizontally
  • tileY (0 or 1, default 1): wrap vertically

One output, LATENT, same as any sampler - wire it into a VAE Decode. Use the pack's Circular VAEDecode for that step, or the seam can sneak back in at decode time (more on that in the issues).

Installing it

It's a tiny pack - no requirements.txt, no pip step, no model downloads, just one Python file against ComfyUI's own modules, GPL-3.0 licensed. ComfyUI Manager is the easy route:

  1. Manager → Install Custom Nodes → search tiled_ksampler → Install → restart ComfyUI

Or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/FlyingFireCo/tiled_ksampler.git

Then restart ComfyUI. It'll show up under Sampling/Tiled.

Where people get burned

  • Seam still visible after decode. This node only wraps diffusion. The VAE decoder has its own convolutions with normal padding, and that reintroduces edge bleeding on its own. Pair it with the pack's Circular VAEDecode and the seam actually stays gone.
  • Expecting VRAM savings. Wrong tool. This samples one full-resolution latent with wrapped edges; it does not split a big render into chunks. That's Tiled Diffusion / Ultimate SD Upscale territory, and it's a different pack entirely.
  • Thinking tileX is a repeat count. It's a 0/1 toggle, not "how many copies." Some community write-ups describe tiled samplers with tile counts - that's a different, chunk-based node, and it'll send you down the wrong path.
  • Odd dimensions. Keep your width and height multiples of 8 so the latent maps cleanly through the VAE's 8x downscale. 1024x1024 for a full tile is a safe, boring choice.

For a 360° shot: generate at a wide aspect ratio with tileX=1, tileY=0, decode with Circular VAEDecode, then stitch copies side by side in an editor. The wrap makes the join invisible.

CategorySampling/Tiled

Inputs (12)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000
tileXINT10–1
tileYINT10–1
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28
schedulerCOMBO9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1

Outputs (1)

NameTypeDescription
LATENTLATENT