ComfyUI Node

Regional Prompting

Regional prompting in one node

By diffussy69·Created 11 months ago·Updated 9 months ago· 2
Regional Prompting
  • clip
  • region_1_mask
  • region_2_mask
  • region_3_mask
  • region_4_mask
  • region_5_mask
  • conditioning
base_positive
region_1_prompt
region_1_strength1.00
region_2_prompt
region_2_strength1.00
region_3_prompt
region_3_strength1.00
region_4_prompt
region_4_strength1.00
region_5_prompt
region_5_strength1.00
show_debugfalse

Want the woman's dress to only affect the woman, the neon sign to only affect the background, and a third prompt doing its own thing in a corner of the frame - all in a single generation? That's regional prompting, and this node is the friendliest way to do it in ComfyUI. It's the most-searched node in the whole curved_weight_schedule pack, and for once the search volume matches the usefulness. It doesn't need Advanced ControlNet, it doesn't need the modified fork, and it works on any model whose CLIP you can hand it. It's just clean, honest regional conditioning.

How it works

Under the hood it's not doing anything exotic - which is exactly why it's reliable. The node encodes your base prompt and each region prompt through the CLIP you plug in, then attaches three things to each region's conditioning: the mask, a mask_strength, and set_area_to_bounds: False. That's the same mechanism ComfyUI's built-in ConditioningSetMask uses, just bundled into one node so you don't have to chain five of them.

The sampler then applies each prompt only where its mask says it should. set_area_to_bounds: False is the important bit - it tells the sampler the mask defines a region inside the full image rather than a boxed-off crop, which is what keeps the regional prompt feeling like part of the same picture instead of a pasted tile.

Inputs that matter

  • clip - your CLIP (from a checkpoint or CLIP loader).
  • base_positive - the global prompt, applied everywhere. This is your "photorealistic, 8k, detailed" backbone.
  • region_1_mask through region_5_mask - a MASK per region. Wire these from any mask source: the pack's Multi-Layer Mask Editor, Auto Person Mask, or a plain mask from elsewhere.
  • region_1_prompt / region_1_strength - the prompt for that region and how hard it pushes (0–10, default 1.0). Regions with no mask or an empty prompt are skipped, so you can use just two or three.

The single output is conditioning, and it goes straight into the positive input of your sampler (KSampler). That's it - one node replaces a small pile of ConditioningSetMask and ConditioningCombine nodes.

Installing it

Grab the pack through ComfyUI Manager (search "curved_weight_schedule") or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/diffussy69/comfyui-curved_weight_schedule

Then pip install matplotlib pillow numpy torch scipy if they're missing, and restart ComfyUI. This node specifically has no extra model downloads.

Where people get burned

The classic mistake is a region prompt that "isn't doing anything." Nine times out of ten the mask isn't where you think it is, or the strength is below 1 and the base prompt is overriding it. Paint a mask you can actually see, keep base_positive as the composition backbone, and let the region prompts add detail rather than fight the base. Also worth knowing: masks are resized to the conditioning area automatically, so you don't need to match mask resolution to the latent - but a tiny mask on a big image gives a tiny region, which is usually the other culprit.

Categoryconditioning

Inputs (18)

NameTypeDefaultDescription
clipCLIP
base_positiveSTRINGBase positive prompt applied everywhere
region_1_maskoptMASK
region_1_promptoptSTRINGPositive prompt for region 1
region_1_strengthoptFLOAT1.000–10Conditioning strength for region 1
region_2_maskoptMASK
region_2_promptoptSTRINGPositive prompt for region 2
region_2_strengthoptFLOAT1.000–10Conditioning strength for region 2
region_3_maskoptMASK
region_3_promptoptSTRINGPositive prompt for region 3
region_3_strengthoptFLOAT1.000–10Conditioning strength for region 3
region_4_maskoptMASK
region_4_promptoptSTRINGPositive prompt for region 4
region_4_strengthoptFLOAT1.000–10Conditioning strength for region 4
region_5_maskoptMASK
region_5_promptoptSTRINGPositive prompt for region 5
region_5_strengthoptFLOAT1.000–10Conditioning strength for region 5
show_debugoptBOOLEANfalsePrint debug information

Outputs (1)

NameTypeDescription
conditioningCONDITIONING