Nodes/ComfyUI-PromptChain/Prompt Chain Regional (Attention Couple)
ComfyUI Node

Prompt Chain Regional (Attention Couple)

The classic multi-character fix, PromptChain-native

By mobcat40·Created 9 months ago·Updated about a month ago· 15
Prompt Chain Regional (Attention Couple)
  • model
  • clip
  • masks
  • MODEL
  • positive
  • negative
regions
base_weight0.50
mask_dilation22
pose

"Attention Couple" is a real, specific technique with a real history - it's the SDXL-era generation of regional prompting that arrived on Forge in early 2024 and became the reference implementation everything since has been measured against. This node is PromptChain's own take on it: give each character in your scene their own prompt, pin it to that character's mask via attention, and stop two characters' hair, outfits, and features from bleeding into each other.

How it works

Regional prompting exists because conditioning is normally global - describe two characters in one prompt and the model reliably smears their attributes together, no matter how carefully you word it. Attention Couple fixes this by masking the model's attention so each region's prompt influences mainly its own area of the canvas. This node patches your MODEL to do exactly that, using the per-figure masks you feed it (from the 3D Poser or Region Boxes) and a shared "everywhere" prompt for the parts of the scene - background, framing, lighting - that aren't tied to any one character.

Worth knowing going in: attention-masking techniques are architecture-specific and don't port between model families, which is why this pack ships a separate node (PromptChain_ZImageRegionalCouple) for Z-Image rather than reusing this one. This node is the SDXL-family option.

The inputs and outputs that matter

regions is required and takes Prompt Chain's regions output (its 4th) - this is what tells the node which $name{} blocks exist and where their prompt text is. Of the two numeric knobs, base_weight (default 0.5) is the one you'll actually reach for: it's the strength of the shared/global prompt everywhere, so raising it pulls the scene's overall description back into every character's region, and lowering it lets each character's own block dominate more cleanly inside their mask. mask_dilation (default 22px) grows each region mask outward a bit before it's applied - useful because a tight silhouette mask clips things like flowing hair, ribbons, or held props that spill past the character's exact outline, leaving them un-conditioned by anyone's prompt.

Two optional inputs bring in the spatial data: masks (per-figure masks, typically from the 3D Poser's MASKS output) and pose (the matching POSE_JSON, which carries figure names so a renamed $name{} block still finds the right mask).

Outputs are MODEL, positive, and negative - the patched model plus its conditioning pair, which go straight into a KSampler like any other regional workflow.

How to install it

Manager: search ComfyUI-PromptChain. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/mobcat40/ComfyUI-PromptChain.git

Restart, and wire this node after your checkpoint loader and Prompt Chain node, ahead of your sampler.

Common issues & troubleshooting

Regions still bleed at the edges. Push mask_dilation up - the default 22px is a reasonable starting point but flowing hair, capes, and held props routinely spill further than that.

A character's block isn't binding to their mask. Make sure pose is actually wired in, especially if you renamed a figure in the 3D Poser after writing the prompt - without it, name matching has nothing to reconcile against.

You're upscaling with tiles and the regions fall apart. Attention-level masking is a full-canvas operation; if you're feeding tiles through a tiled upscaler, each tile only sees part of the mask. The pack's PromptChain_RegionalConditioning node bakes the region split into the conditioning objects themselves instead, which is what survives being cut into tiles.

On Z-Image, this node isn't the one. Reach for PromptChain_ZImageRegionalCouple instead - same idea, architecture-specific implementation, and considerably more tunable.

Categorypromptchain

Inputs (7)

NameTypeDefaultDescription
modelMODEL
clipCLIP
regionsSTRINGWire to Prompt Chain's 'regions' output (4th).
base_weightFLOAT0.500.01–1Strength of the shared/global prompt everywhere.
mask_dilationINT220–128Grow each region mask so ribbons/hair/props aren't clipped.
masksoptMASKPer-figure masks from the 3D Poser MASKS output.
poseoptSTRINGWire to the 3D Poser's POSE_JSON output — carries the figure names so renamed $blocks bind to the right mask.

Outputs (3)

NameTypeDescription
MODELMODEL
positiveCONDITIONING
negativeCONDITIONING