KSampler (Prompt by Tiled Region)
Regional Prompts on Canvases Too Big to Sample Whole
- model
- positive
- negative
- region_masks
- latent_image
- latent
Regional prompting has a scaling problem. Masked conditioning on a 1024×1024 canvas is one thing; do it on a 3072×3072 canvas and the sampler is evaluating a latent so far outside its training resolution that regions stop cooperating and detail goes mushy. KSampler (Prompt by Tiled Region) is the answer to that second problem: it denoises the large latent in overlapping tiles while still honoring the global prompt plus ordered, mask-bound regional prompts. In other words, it's KSampler (Prompt by Region) with tiled diffusion bolted in, and it's the only sensible way to do regional prompting on big canvases without a monster GPU.
How it works
Every denoising step, the latent is divided into overlapping tile contexts, evaluated in batches, and the tile predictions are blended back together. The regional structure rides along because the per-region masks are applied inside each tile's conditioning. Two mechanisms are available via diffusion_mode:
- multidiffusion (default): averages the overlapping predictions. Steady, predictable, the safe default.
- Mixture of Diffusers: weights tile centers more heavily. Softer blending, which some people prefer when seams are the complaint.
The tile knobs are the same set as the pack's other tiled samplers:
- latent_tile_width / latent_tile_height (default 128×128): tile size in latent pixels. Bigger tiles see more context but cost more VRAM.
- latent_tile_overlap (default 16): overlap between tiles. More overlap kills seams but adds compute.
- latent_tile_batch_size (default 4): tiles sampled per batch. Higher is faster but thirstier.
Plus the regional controls you already know from KSampler (Prompt by Region): regional_prompt_weight (0.5), region_mask_feather (0), and the global-first positive/negative batches pairing with region_masks. Sampling settings (steps 20, cfg 8, denoise 1) are standard KSampler fare. Output is a single latent.
When it's the right tool
The honest line from the pack README: tiled diffusion keeps each evaluation small, but tiles don't automatically understand the whole image - that's what Contextual Diffusion exists for. So this node is for when your regions are the point and the canvas is large: big-character scenes, full-body plus face on a tall canvas, that kind of thing. If the canvas is only moderately over budget, plain regional sampling might be fine and a lot faster. If you need the whole-image composition to stay coherent at extreme sizes, look at KSampler (Contextual Diffusion) instead - it doesn't do per-region prompts, but it does solve the "tiles lost the plot" problem.
Install
Part of the SimpleSyrup pack. ComfyUI Manager → search SimpleSyrup → Install → restart, or:
Set-Location ComfyUI\custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup.git
Set-Location SimpleSyrup
..\..\venv\Scripts\python.exe -m pip install -r requirements.txt
Restart ComfyUI afterward. Needs a current ComfyUI build (v3 extension API).
Common issues
- Tile seams - raise
latent_tile_overlap, or switchdiffusion_modeto Mixture of Diffusers. - Region prompts map wrong - ordering: batch entry 1 pairs with mask 0.
- Out of VRAM - drop tile size or
latent_tile_batch_sizebefore touching anything else. - Nodes missing - update ComfyUI first; the pack won't register on an old build.
It's the regional sampler for when "just sample it whole" stopped being an option.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Diffusion model used to denoise the input latent. | |
| seed | INT | 00–18446744073709550000 | Seed used to create sampling noise. Reusing it with matching settings makes results repeatable. |
| steps | INT | 201–10000 | Number of denoising steps. More steps can add refinement but take longer. |
| cfg | FLOAT | 8.00–100 | Prompt guidance strength. Higher values follow the positive prompt more strongly but can look overcooked. |
| sampler_name | COMBO | Sampling algorithm. It affects the image's look, speed, and stability. | |
| scheduler | COMBO | Noise schedule used during sampling. It changes how quickly structure and detail form. | |
| positive | CONDITIONING,CONDITIONING_BATCH | Positive conditioning whose first batch entry is global and later entries pair with masks in order. | |
| negative | CONDITIONING,CONDITIONING_BATCH | Negative conditioning whose first batch entry is global and later entries pair with masks in order. | |
| region_masks | MASK | Ordered authored masks; mask 0 pairs with conditioning batch entry 1. | |
| regional_prompt_weight | FLOAT | 0.500–1 | Balances regional prompts against the global prompt; 0 uses only global prompting, 1 uses only regional prompting inside solid masks, and overlaps reduce the global share further. |
| region_mask_feather | INT | 00–512 | Softens regional mask edges by this many image pixels; 0 preserves authored mask values. |
| latent_image | LATENT | Latent input whose samples will be denoised. | |
| denoise | FLOAT | 1.000–1 | Sampling strength. Lower values preserve the input more; higher values allow larger changes. |
| diffusion_mode | COMBO | multidiffusion | Tiled blend method; MultiDiffusion is steady while Mixture of Diffusers weights tile centers more strongly. |
| latent_tile_width | INT | 12816–512 | Width of each latent tile. Larger tiles see more context but use more memory. |
| latent_tile_height | INT | 12816–512 | Height of each latent tile. Larger tiles see more context but use more memory. |
| latent_tile_overlap | INT | 160–256 | Overlap between latent tiles. Larger overlaps reduce seams but increase sampling work. |
| latent_tile_batch_size | INT | 41–8 | Number of latent tiles sampled together. Higher values can be faster but use more memory. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Denoised latent for VAE decode or more latent processing. |