Nodes/SimpleSyrup/KSampler (Attention Coupling + Tiled Diffusion)
ComfyUI Node

KSampler (Attention Coupling + Tiled Diffusion)

Attention Coupling meets tiled diffusion

By Artificial-Sweetener·Created 4 months ago·Updated 2 days ago· 2
KSampler (Attention Coupling + Tiled Diffusion)
  • model
  • positive
  • negative
  • latent_image
  • region_masks
  • latent
seed0
steps20
cfg8.0
sampler_name
scheduler
regional_prompt_weight1.00
region_mask_feather0
denoise1.00
diffusion_modemultidiffusion
latent_tile_width128
latent_tile_height128
latent_tile_overlap16
latent_tile_batch_size4

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, default 128. Keep near the model's comfortable context; bigger tiles see more context but eat more memory.
  • latent_tile_overlap - default 16. Larger overlaps reduce seams but add sampling work.
  • latent_tile_batch_size - default 4. Tiles sampled together; higher is faster with memory headroom, max 8.
  • 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.

CategorySimpleSyrup/Sampling

Inputs (18)

NameTypeDefaultDescription
modelMODELSupported Anima or standard SD/SDXL model used for one shared denoiser trajectory; apply global model LoRAs before connecting it.
seedINT00–18446744073709550000Seed used to create sampling noise. Reusing it with matching settings makes results repeatable.
stepsINT201–10000Number of denoising steps. More steps can add refinement but take longer.
cfgFLOAT8.00–100Prompt guidance strength. Higher values follow the positive prompt more strongly but can look overcooked.
sampler_nameCOMBOSampling algorithm. It affects the image's look, speed, and stability.
schedulerCOMBONoise schedule used during sampling. It changes how quickly structure and detail form.
positiveCONDITIONING,CONDITIONING_BATCHGlobal-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.
negativeCONDITIONING,CONDITIONING_BATCHGlobal-first negative conditioning aligned to the same masks; Anima regional LoRA hooks retain their negative-branch ownership and independent schedules.
regional_prompt_weightFLOAT1.000–1Balances 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_featherINT00–512Softens Attention Coupling and Anima regional LoRA boundaries by this many image pixels; 0 preserves authored mask values.
latent_imageLATENTLatent input whose samples will be denoised.
denoiseFLOAT1.000–1Sampling strength. Lower values preserve the input more; higher values allow larger changes.
diffusion_modeCOMBOmultidiffusionTile overlap blend. MultiDiffusion averages predictions; Mixture of Diffusers gives tile centers more influence.
latent_tile_widthINT12816–512Width of each latent tile. Larger tiles see more context but use more memory.
latent_tile_heightINT12816–512Height of each latent tile. Larger tiles see more context but use more memory.
latent_tile_overlapINT160–256Overlap between latent tiles. Larger overlaps reduce seams but increase sampling work.
latent_tile_batch_sizeINT41–8Number of latent tiles sampled together. Higher values can be faster but use more memory.
region_masksoptMASKOptional 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)

NameTypeDescription
latentLATENTDenoised latent for VAE decode or more latent processing.