Nodes/attention-couple-ComfyUI/Load Attention couple
ComfyUI Node

Load Attention couple

Two characters, one canvas, zero feature-bleed

By laksjdjf·Created 3 years ago·Updated 2 years ago· 63
Load Attention couple
  • model
  • positive
  • negative
  • MODEL
  • CONDITIONING
  • CONDITIONING
mode

Two characters, one canvas, zero feature-bleed

This is the node for the oldest multiplayer pain in Stable Diffusion: you prompt a red-haired girl on the left and a blue-haired girl on the right, and by step 15 they've swapped hair colors, outfits, and vibes. That's attribute bleeding, and a single global prompt can't fix it - the model conditions on the whole canvas at once. Load Attention couple (class Attention couple, by laksjdjf) is the ComfyUI port of the Attention Couple technique that landed on SD Forge in early 2024, and it's the template nearly every modern two-characters workflow descends from. The name is honest in one direction and a lie in another: it does nothing in latent space, but it genuinely re-routes attention inside the UNet.

Why it beats Latent Couple

Latent Couple (and ComfyUI's built-in mask-based regional conditioning) does the split by masking the latent at sample time - and it pays for it by running the UNet once per region, so a three-region image costs three times the compute. Attention Couple instead recomputes only the cross-attention layers per region, once per step. A single KSampler, one render, and the time lands barely above a plain generation. That speed is the whole appeal, and it's the reason people put up with its quirks.

How it works

In Attention mode the node deep-copies your conditionings, pulls the mask and mask_strength off each one, and normalizes the masks so they sum to 1 across the canvas. Then it clones your model and patches every cross-attention (attn2) block - input, middle, and output blocks, with different block lists for SD 1.5 and SDXL, which it detects automatically. During sampling, each latent pixel's attention is computed against each region's prompt separately, multiplied by that region's mask, and summed. The result: pixels mostly attend to their region's prompt, and the edges blend naturally because the masks are normalized. That's also the tradeoff - attention runs at downsampled resolution deep in the UNet, so fine, hair-thin splits are genuinely hard. Regions come out fuzzy-bounded, which the author concedes outright.

The inputs and outputs that matter

Only four inputs, and two of them are just wiring:

  • model - your checkpoint, straight from the Load Checkpoint.
  • positive / negative - and here's the thing: these take the combined list of per-region conditionings, each with a mask attached via ConditioningSetMask (set strength 1.0). Build them the same way you'd build a Latent Couple graph. If a conditioning list has only one entry, there's nothing to split and it passes through.
  • mode - Attention does the real work. Latent is a pure passthrough: the node just echoes its inputs so the standard mask-based latent behavior applies instead.

Outputs are three: the patched MODEL, plus the positive and negative conditioning - wire all three into your KSampler.

Installing it

ComfyUI Manager → search attention-couple-ComfyUI, install, restart. Or the old-fashioned way:

cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/attention-couple-ComfyUI

Then restart ComfyUI. There's no requirements.txt and nothing to download - the pack imports only torch and ComfyUI internals. One honest caveat: the README says the project has moved to laksjdjf/cgem156-ComfyUI/scripts/attention_couple, so this repo is essentially frozen. If it ever breaks on a newer ComfyUI, that's why.

Known issues - the author's own list

  1. Error if any area isn't covered by a prompt. If the union of your masks leaves a dead zone, the mask normalization divides by zero. Make sure your masks tile the whole canvas.
  2. No per-region LoRA. LoRAs apply globally. You cannot give region A its character LoRA and region B its own. The author says they have no idea how that would even work.
  3. SDXL pooled output isn't split - the first prompt's pooled conditioning is fed through for every region, which can smear style.

The real-world caveat

Community consensus is that this node is powerful and fiddly - one 2024 thread calling it "way harder to use" than ComfyCouple, a friendlier wrapper built directly on it. If the raw node fights you, that's the upgrade path. But for the core move - two characters, distinct attributes, one fast pass - Attention Couple is where it all started, and it still works.

Categoryloaders

Inputs (4)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
modeCOMBO2 options: Attention, Latent

Outputs (3)

NameTypeDescription
MODELMODEL
CONDITIONINGCONDITIONING
CONDITIONINGCONDITIONING