Nodes/duckcomfy personal nodes/DuckAttention Couple Region
ComfyUI Node

DuckAttention Couple Region

One region of your image, one prompt, one weight

By duckcomfy·Created about a year ago·Updated 10 months ago· 0
DuckAttention Couple Region
  • cond
  • mask
  • region
weight1.00

Duck Attention Couple Region is the building block of the pack's attention-couple system: it packages one prompt (cond), one area of the canvas (mask), and one strength (weight) into a single "region" object that the DuckAttentionCouple node later consumes. On its own it does nothing visible - it's a data container. But it's how you tell the system "the left side of the image is the girl with red hair, at this strength."

This is regional prompting, the standing technique for multi-subject scenes where attributes bleed together. A single global prompt describing two characters reliably smears their traits - the girl on the left ends up with the other one's hair. Regional prompting splits the canvas and gives each area its own conditioning, and attention couple is one specific implementation of that idea: it masks cross-attention so each region's tokens steer the pixels inside its own mask. The region object is the unit of that split.

The inputs that matter

  • cond - a CONDITIONING for this region. Encode your per-region prompt with any CLIP Text Encode before feeding it in.
  • mask - a MASK, white where this region lives, black elsewhere. Paint it in the Mask Editor, or derive it from a segmentation/SAM result.
  • weight - FLOAT, 0.01–1.0, default 1.0. How strongly this region's prompt is applied. This is your per-region strength knob.

Output is a region (ATTENTION_COUPLE_REGION), which you wire into DuckAttentionCoupleRegions (to bundle several) or straight into DuckAttentionCouple (which accepts a single region directly).

Grounded usage tips

Community practice from years of attention-couple workflows is worth stealing before you experiment: the base prompt should describe the scene generically ("two people in a park") and each region narrows one subject; if a region's features aren't landing, lower that region's weight or raise the others' rather than cranking it up. The mask must cover real pixels - a region with an empty or all-black mask is a region with nothing to steer, and if the masks don't cover the whole canvas, the couple node will assert an error.

Install

Part of duckcomfy personal nodes. ComfyUI Manager → search "duckcomfy personal nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/duckcomfy/duckcomfy_personal_nodes

Restart ComfyUI. No pip dependencies, no model downloads. The attention-couple code is a GPL-3.0 port of the established cgem156-ComfyUI / sd-forge-couple implementation, so the behavior is well-trodden.

Gotchas

The mask resolution matters: the couple node interpolates region masks to the generation size, but feeding it masks wildly different from the canvas invites the classic "tensor size mismatch" error people hit with this technique. Keep masks at image resolution. And remember weight here is per-region, separate from the global_prompt_weight you'll set on the couple node - they're two different levers, and getting them balanced is the whole craft of the technique.

Categoryduckcomfy

Inputs (3)

NameTypeDefaultDescription
condCONDITIONING
maskMASK
weightFLOAT1.000.01–1

Outputs (1)

NameTypeDescription
regionATTENTION_COUPLE_REGION