Nodes/ComfyUI Prompt Control/PC: Attention Couple (batch negative)
ComfyUI Node

PC: Attention Couple (batch negative)

Attention Couple (batch negative) — keeping regional masks in sync across a batch

By asagi4·Created 3 years ago·Updated about 13 hours ago· 423
PC: Attention Couple (batch negative)
  • positive
  • negative
  • positive
  • negative

This is a plumbing node, and a narrow one: it exists to fix a specific mismatch that shows up when you combine Attention Couple (regional prompting - different prompts for different parts of the canvas) with batch generation. The pack's own one-line description is the clearest summary you'll get: "Batch negatives, carrying over Attention Couple hooks."

Why this needs to exist

Attention Couple works by attaching hooks to your positive conditioning - masking cross-attention and/or self-attention so each region only "sees" its own prompt. Those hooks live on the positive side. When you batch your generation (multiple images per run) and your negative conditioning needs to match the batch shape, the negative conditioning doesn't automatically inherit the region-mask hooks the positive side has - they're two separate conditioning objects. Without something reconciling them, your regional masking can desync between positive and negative, or the negative batch just won't line up with what the positive side is doing per-region.

PCAttentionCoupleBatchNegative takes both conditionings and hands back a positive/negative pair where the negative has been batched to match and the Attention Couple hooks carried over correctly. It's a small, mechanical fix for a real seam in the pipeline, not a feature you build a prompt around.

Inputs and outputs

Required: positive and negative, both CONDITIONING - your already-encoded positive (with Attention Couple hooks attached, from wherever you built your regional prompt setup) and your negative. Outputs: positive and negative, the same pair, reconciled and ready for the sampler.

Installing it

ComfyUI Manager: search "ComfyUI Prompt Control", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/asagi4/comfyui-prompt-control

No model downloads - this is conditioning-object bookkeeping, nothing more.

Where people get tripped up

If you're not doing batch generation, or you're not using Attention Couple, you don't need this node - it solves a problem that only exists at the intersection of those two things. Wiring it into a single-image, no-regional-masking workflow is a no-op at best.

The bigger trap is ordering: this node expects a positive conditioning that already has Attention Couple hooks attached. Wire it before you've actually built your regional setup - before PCAddMaskToCLIP/IMASK() or whatever attention-couple patch you're using has run - and there's nothing for it to carry over. Build your regional positive conditioning first, batch it, then pass both here right before the sampler. And keep in mind regional prompting is architecture-specific machinery in general - a setup built around one base model's Attention Couple implementation won't necessarily port to another without its own dedicated node, same as the rest of this technique's history.

Categorypromptcontrol/v2

Inputs (2)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING

Outputs (2)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING