Nodes/WtlNodes/Tiled Sampler (Custom Advanced)
ComfyUI Node

Tiled Sampler (Custom Advanced)

Tiled Sampler (Custom Advanced)

By Scorpiosis0·Created 10 months ago·Updated 2 months ago· 3
Tiled Sampler (Custom Advanced)
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • output
  • tiles
tile_factor/2
context_size256
seam_flat_width128
seam_feather128
seam_fix_max_sigma0.7

You want a big image - a 3:2 wall print, a 4K background, a poster - and your GPU is already sweating at 1024×1024. The usual advice is "generate small, upscale after," and that works. But sometimes you want to sample at the target resolution, and a single full-res pass either OOMs or crawls. That's the exact job of the Tiled Sampler (Custom Advanced) from the WtlNodes pack: it runs the sampler on overlapping tiles and then runs a dedicated pass to hide the seams.

It's not the first tiled sampler for ComfyUI and won't be the last, but this one has a thoughtful trick: instead of trying to blend overlapping tile edges (which always leaves faint gridlines), it samples each tile flat and then does a strip-based seam fix pass - a mini inpainting run centered on each seam. That's the bit that makes it worth a look.

How it works

Wire it up exactly like the core SamplerCustomAdvanced - it takes a NOISE, GUIDER, SAMPLER, and SIGMAS - plus a latent_image. Because it slots into sampling/custom_sampling, you bring your own sampler and scheduler, and everything downstream of those nodes behaves normally.

  • tile_factor - /2, /4, or /8, the number of tiles along the short side. /2 = 4 tiles, /4 = 16. More tiles = lower per-tile VRAM but more total work and more seams to fix.
  • context_size - extra pixels of the surrounding image each tile gets to "see." This is the setting people get burned by. Set it to 0 and every tile is blind, so the model invents independent content and the seams have nothing to blend into. Keep 256 as a starting point.
  • seam_flat_width - the width of the fully regenerated zone centered on each seam, where the mask is 1.0 (full inpainting strength).
  • seam_feather - the gaussian falloff on each side. Total strip = seam_flat_width + 2 × seam_feather. Bigger feather = smoother blend but weaker seam correction.
  • seam_fix_max_sigma - the seam pass rescales your sigma schedule so its peak equals this value. Lower it to keep the fix gentle; raise toward 1 if seams still show.

You get two outputs: the final LATENT and a tiles image that draws the tile grid - handy for confirming the layout before you commit.

When to reach for it (and when not to)

This is for high-resolution sampling where VRAM is the wall. It does not save time - it adds passes, so expect slower total runtime on a GPU that could handle the full image. The win is fitting a latent that would otherwise OOM, or speeding up one that barely fits by shrinking each tile's working set. If you have the VRAM, a single full-res pass is still the cleaner result. For upscaling existing detail rather than re-sampling, you're often better served by ControlNet Tile or an Ultimate SD Upscale-style pass (the modidex upscaling notes cover that whole family).

Install

The whole pack is one clone:

cd ComfyUI/custom_nodes
git clone https://github.com/Scorpiosis0/ComfyUI-WtlNodes.git

Then restart ComfyUI. ComfyUI Manager users: search "WtlNodes" in the Custom Nodes Manager and install there. Dependencies are just numpy, scipy, and pillow - nothing heavy, no model downloads for this node.

Troubleshooting

  • Visible grid / tiles that don't match: raise context_size and bump seam_flat_width and seam_fix_max_sigma together. A weak seam pass with tiny context is the #1 cause of tiled-sampler artifacts.
  • Seams that look "smudged": your feather is probably eating the flat zone. Keep seam_flat_width ≥ a couple of tile pixels so there's a real regenerated strip to blend.
  • Very slow: /8 on a big latent means dozens of tiles plus seam strips. If you only need to upscale, don't use this node - that's not its job.
  • The tiles output doesn't match the final image: normal. It's a diagnostic grid, not a preview of the seam-fixed result.
Categorysampling/custom_sampling

Inputs (10)

NameTypeDefaultDescription
noiseNOISE
guiderGUIDER
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT
tile_factorCOMBO/2Number of tiles along the short side.
context_sizeINT2560–512Extra pixels of surrounding image the model sees as context.
seam_flat_widthINT1288–256Width of the fully regenerated zone in pixels, centered on each seam. This zone gets mask=1.0 — full inpainting strength.
seam_featherINT1280–256Width of gaussian falloff on each side of the flat zone. Total sampled strip = seam_flat_width + 2 * seam_feather. Larger = smoother blend into surrounding image.
seam_fix_max_sigmaFLOAT0.70.1–10Max sigma for the seam fix pass. Input sigmas are rescaled so the peak equals this value, steps stay proportional.

Outputs (2)

NameTypeDescription
outputLATENT
tilesIMAGE