Nodes/SimpleSyrup/Compose Regional Conditioning
ComfyUI Node

Compose Regional Conditioning

Regional Prompts for Any Sampler — No Custom Sampler Required

By Artificial-Sweetener·Created 3 months ago·Updated 12 days ago· 2
Compose Regional Conditioning
  • positive
  • negative
  • region_masks
  • positive
  • negative
regional_prompt_weight0.50
region_mask_feather0

Here's the thing about regional prompting that nobody warns you about: the whole game is masked conditioning, and ComfyUI's plain old KSampler understands masked conditioning natively. You don't need a special "regional sampler" at all - you need your prompt batch and masks turned into the standard masked-conditioning format the vanilla sampler already consumes. That conversion is exactly what Compose Regional Conditioning does. It takes a global-first prompt batch plus an ordered set of masks and hands you back normal CONDITIONING values, hooks and all, ready for any sampler you like.

This is the node that frees you from the pack's own regional samplers. KSampler (Prompt by Region) is convenient, but it only works inside SimpleSyrup. Compose outputs standard ComfyUI conditioning, so the result plugs into KSampler, KSamplerAdvanced, ControlNet stacks, anything. If you want regional control with your existing favorite sampling setup, this is the bridge.

How it works

The convention is global-first: batch entry 0 is the whole-canvas prompt, and every entry after it pairs with a mask in order (mask 0 ↔ batch entry 1, mask 1 ↔ entry 2...). The node masks each regional conditioning against its mask and mixes it with the global conditioning. Two controls decide how the mix behaves:

  • regional_prompt_weight (default 0.5): the balance between regional and global prompts. 0 means global-only prompting - regions are ignored. 1 means regional-only inside solid mask areas. Overlaps reduce the global share further, which is the sensible behavior when two masks overlap and both region prompts are fighting for the same pixels.
  • region_mask_feather (default 0): softens mask edges by this many image pixels. 0 preserves your authored mask exactly. When you see the telltale "collaged" seams between regions, this is the first knob to raise.

positive and negative both accept either a single CONDITIONING or a CONDITIONING_BATCH (the tooltip spells out the global-first pairing). region_masks is the ordered MASK input. Outputs are standard positive and negative conditioning "with hooks preserved" - so LoRA and Prompt Control hooks survive the trip.

When it's the right tool

Regional prompting exists because a single prompt with two subjects reliably smears their attributes together - the girl on the left and the one on the right swap hair colors. Masked conditioning is the standing fix, and the KB's honest note is that the technique works best when you let the regions blend after composition forms, rather than holding hard masks for the whole sample. So don't be shy about regional_prompt_weight below 1 and some feather - the "collaged" look is a parameter problem, not a node problem.

Install

It ships in the SimpleSyrup pack. ComfyUI Manager → search SimpleSyrup → Install → restart. Manual:

Set-Location ComfyUI\custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup.git
Set-Location SimpleSyrup
..\..\venv\Scripts\python.exe -m pip install -r requirements.txt

Restart ComfyUI. The pack needs a current ComfyUI build (v3 extension API) or none of its nodes register.

Common issues

  • Regions have hard visible seams - raise region_mask_feather and/or lower regional_prompt_weight. The technique's classic failure is masking too hard for too long.
  • Prompt pairs with the wrong region - ordering. Batch entry 1 pairs with mask 0. Count your [SEP] segments and your masks; they must match.
  • Nothing regional is happening - with regional_prompt_weight at 0 you've told it to ignore regions entirely. Bump it up.

It's the node that turns "regional prompting" from a sampler-specific feature into a standard-conditioning trick you can run anywhere - worth the one-time mental model.

CategorySimpleSyrup/Conditioning

Inputs (5)

NameTypeDefaultDescription
positiveCONDITIONING,CONDITIONING_BATCHPositive conditioning whose first batch entry is global and later entries pair with masks in order.
negativeCONDITIONING,CONDITIONING_BATCHNegative conditioning whose first batch entry is global and later entries pair with masks in order.
region_masksMASKOrdered authored masks; mask 0 pairs with conditioning batch entry 1.
regional_prompt_weightFLOAT0.500–1Balances regional prompts against the global prompt; 0 uses only global prompting, 1 uses only regional prompting inside solid masks, and overlaps reduce the global share further.
region_mask_featherINT00–512Softens regional mask edges by this many image pixels; 0 preserves authored mask values.

Outputs (2)

NameTypeDescription
positiveCONDITIONINGStandard masked positive conditioning with hooks preserved.
negativeCONDITIONINGStandard masked negative conditioning with hooks preserved.