Nodes/ComfyUI Impact Pack/TiledKSamplerProvider
ComfyUI Node Runs on cloud

TiledKSamplerProvider

A tiled sampler for TwoSamplersForMask and friends

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
TiledKSamplerProvider
  • basic_pipe
  • KSAMPLER
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise1.00
tile_width512
tile_height512
tiling_strategy

TwoSamplersForMask and TwoAdvancedSamplersForMask need their sampler inputs as a connectable KSAMPLER object, not a sampler_name dropdown string - and by default the only way to build one is KSamplerProvider, which wraps a plain KSampler. TiledKSamplerProvider is the alternative: it wraps ComfyUI_TiledKSampler instead, so the sampler you plug into a two-samplers node is tiled - useful when the region you're sampling (or the whole canvas) is large enough that a plain KSampler pass would blow your VRAM budget. Per the README, it's "a wrapper that provides KSAMPLER," built specifically so ComfyUI_TiledKSampler's tiling can slot into places that expect the pack's KSAMPLER type.

This node needs BlenderNeko's ComfyUI_TiledKSampler installed separately - the same dependency PixelTiledKSampleUpscalerProvider has, since both wrap the same underlying tiled sampler.

How it works

It bundles model/clip/vae/positive/negative - via a basic_pipe - with the usual sampling controls and the Tiled KSampler's own tile_width/tile_height/tiling_strategy, and produces a KSAMPLER object. Whatever downstream node actually calls that KSAMPLER - TwoSamplersForMask, TwoAdvancedSamplersForMask, TwoSamplersForMaskUpscalerProvider - runs it as its sampling step, tiled, without needing to know or care that it's tiled rather than a plain KSampler underneath.

The inputs and outputs that matter

  • basic_pipe (required) - model/clip/vae/positive/negative, bundled.
  • seed / steps / cfg / sampler_name / scheduler / denoise - the usual sampling controls, applied whenever this KSAMPLER is invoked.
  • tile_width / tile_height (default 512, step 64) - tile size for the internal sampling. 512 is a sane SD 1.5/SDXL-era default.
  • tiling_strategy (random / padded / simple) - how seams between tiles are handled across steps. random denoises gradually while shuffling tile positions (best at hiding seams); padded gives each tile static context instead (no per-step overhead); simple is a plain static grid (fastest, most seam-prone).

Output is a single KSAMPLER - it doesn't sample anything by itself. Plug it into base_sampler/mask_sampler on TwoSamplersForMask, or wherever else the pack expects a KSAMPLER type.

How to install it

Via ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
python -m pip install -r requirements.txt   # ComfyUI's python; python_embeded on portable

then restart. Also install BlenderNeko/ComfyUI_TiledKSampler - search "Tiled sampling for ComfyUI" in Manager, or clone it manually. This node cannot function without it.

Common issues & troubleshooting

Node missing or errors. ComfyUI_TiledKSampler isn't installed - check that first, it's a separate pack from Impact Pack.

Nothing happens when this node runs alone. Expected - it only builds a KSAMPLER object. It has to feed into something that actually samples with it, like TwoSamplersForMask.

Seams visible where tiles meet. Switch tiling_strategy to random if you're on simple, or increase tile size if your regions are small relative to the detail you're trying to preserve.

Do you need the tiled version over plain KSamplerProvider? Only if you're hitting VRAM limits with a plain KSampler in this slot - say, sampling a large masked region inside TwoSamplersForMask. If a regular KSampler fits fine, KSamplerProvider is simpler and has no extra dependency.

CategoryImpactPack/Sampler

Inputs (10)

NameTypeDefaultDescription
seedINT00–18446744073709550000Random seed to use for generating CPU noise for sampling.
stepsINT201–10000total sampling steps
cfgFLOAT8.000–100classifier free guidance value
sampler_nameCOMBOsampler
schedulerCOMBOnoise schedule
denoiseFLOAT1.000–1The amount of noise to remove. This amount is the noise added at the start, and the higher it is, the more the input latent will be modified before being returned.
tile_widthINT512320–16384Sets the width of the tile to be used in TiledKSampler.
tile_heightINT512320–16384Sets the height of the tile to be used in TiledKSampler.
tiling_strategyCOMBOSets the tiling strategy for TiledKSampler.
basic_pipeBASIC_PIPEbasic_pipe input for sampling

Outputs (1)

NameTypeDescription
KSAMPLERKSAMPLERsampler wrapper. (Can be used when generating a regional_prompt.)