KSampler (Attention Coupling + Tiled Diffusion)
Attention Coupling meets tiled diffusion
- model
- positive
- negative
- latent_image
- region_masks
- latent
The plain Attention Coupling sampler needs the whole latent in one model evaluation, which means it dies on big canvases the same way every sampler does: out of memory, or worse, running but making terrible decisions because the canvas is far outside the model's working resolution. This variant keeps all the regional coupling and splits the job into overlapping tiles. It's the "I just need it to fit and render" answer for regional prompts at 2K and up.
How it works
Same conditioning contract as the base sampler - entry 0 of positive/negative is global, later entries pair with region_masks - but instead of one full-latent denoise, it divides the latent into overlapping tiles, evaluates them in batches through one shared model trajectory per tile batch, and fuses the restored predictions every step. The coupling between global and masked regional cross-attention happens within each tile context, so your regions work whether or not they span tiles.
Two fusion modes, same as the pack's dedicated tiled sampler:
- MultiDiffusion (default) - averages the overlapping predictions.
- Mixture of Diffusers - Gaussian weights that favor each tile's center.
MultiDiffusion is the safe default. Switch to Mixture of Diffusers when you're chasing seams and want tile centers to dominate the blend.
The honest limit is stated plainly in the SimpleSyrup README: tiling keeps each evaluation small, but it does not make the tiles understand the same complete image. If your regional edit depends on whole-scene coherence - swapping a cathedral for a different building without letting each tile invent its own cathedral - you want the Contextual Diffusion variant instead. Reach for this one when the job is "apply regional prompts at a resolution that happens to exceed one pass," not "keep a global composition honest."
Inputs that matter
Beyond the shared coupling fields (regional_prompt_weight, region_mask_feather, region_masks), the tile controls are yours to set:
latent_tile_width/latent_tile_height- tile size in latent pixels, default128. Keep near the model's comfortable context; bigger tiles see more context but eat more memory.latent_tile_overlap- default16. Larger overlaps reduce seams but add sampling work.latent_tile_batch_size- default4. Tiles sampled together; higher is faster with memory headroom, max8.diffusion_mode- the fusion mode above.
A few notes on units. Tile controls live in latent pixels (the values here are 8x smaller than the image pixels you're used to), and overlap is where most seam complaints come from - if you see tile lines, raise latent_tile_overlap before touching anything else.
Fallback behavior, and who should use it
Feed it ordinary conditioning and leave region_masks disconnected, and it degrades to plain tiled diffusion with no coupling preparation - which makes it a legitimate standalone large-canvas sampler, not just a regional tool. On Anima it inherits the regional-LoRA capability of the base coupling sampler (with ComfyUI Prompt Control installed); standard SD/SDXL rejects regional model-side hooks up front.
Regional prompting at scale is a genuinely fiddly corner, so start minimal: one global prompt, one mask, defaults for tile size and overlap. Get the region behaving on a small crop first, then blow it up to the full canvas. If the whole-image result starts lying to you about composition, that's the signal to step up to the Contextual variant - this one is the pragmatic workhorse, not the clever one.
Install via SimpleSyrup: Manager search, or clone into custom_nodes plus requirements.txt. No model downloads; needs a current ComfyUI for the V3 node API.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Supported Anima or standard SD/SDXL model used for one shared denoiser trajectory; apply global model LoRAs before connecting it. | |
| 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 | Global-first positive conditioning: entry 0 is global and later entries pair with masks. Regional Prompt Control WeightHooks may contain ordered full-rank Anima LoRA stacks with independent schedules; standard SD/SDXL rejects regional model-side hooks. | |
| negative | CONDITIONING,CONDITIONING_BATCH | Global-first negative conditioning aligned to the same masks; Anima regional LoRA hooks retain their negative-branch ownership and independent schedules. | |
| regional_prompt_weight | FLOAT | 1.000–1 | Balances regional cross-attention against the global prompt from 0 (global only) to 1 (regional only inside solid masks); regional Anima LoRA strength remains controlled by each hook. |
| region_mask_feather | INT | 00–512 | Softens Attention Coupling and Anima regional LoRA boundaries 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 | Tile overlap blend. MultiDiffusion averages predictions; Mixture of Diffusers gives tile centers more influence. |
| 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. |
| region_masksopt | MASK | Optional ordered masks paired with conditioning entries 1 onward. Leave disconnected with ordinary conditioning to bypass Attention Coupling. In overlaps, prompt contributions are normalized while Anima regional LoRA deltas add in declared adapter and region order. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Denoised latent for VAE decode or more latent processing. |