Nodes/ComfyUI Impact Pack/CombineRegionalPrompts
ComfyUI Node Runs on cloud

CombineRegionalPrompts

Merge your per-region prompts into one bundle for RegionalSampler

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
CombineRegionalPrompts
  • regional_prompts1
  • REGIONAL_PROMPTS

Regional sampling in Impact Pack works like this: you build one RegionalPrompt per subject - a mask plus an advanced sampler carrying that subject's prompt - and RegionalSampler needs all of them at once to know how to divide up the canvas. CombineRegionalPrompts is the node that takes however many RegionalPrompts you've built and merges them into a single REGIONAL_PROMPTS bundle that RegionalSampler actually consumes.

It's pure plumbing, and it's the piece that makes multi-subject regional generation scale past two regions. Without it, you'd need RegionalSampler to accept a variable number of separate region inputs directly, which is clunkier than accepting one combined bundle.

How it works

Each RegionalPrompt node outputs its own REGIONAL_PROMPTS - technically already a bundle, just one holding a single region. CombineRegionalPrompts concatenates multiple of these into one. The node's base slot is regional_prompts1; connecting something to it is what makes the UI offer another slot below it, the same expanding-input pattern the pack uses elsewhere for its "combine N things" nodes, so you can keep adding regions as you have more subjects. Order among the merged inputs doesn't change the result - RegionalSampler treats every region in the combined bundle the same way, sampling each one every step alongside the base.

The inputs and outputs that matter

  • regional_prompts1 (REGIONAL_PROMPTS, required) - a region built with RegionalPrompt. Connect one output from each subject you want to combine; connecting the first slot is what reveals room for more.

Output is a single REGIONAL_PROMPTS - feed it straight into RegionalSampler's regional_prompts input.

How to install it

Ships with the Impact Pack. ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt

run that with ComfyUI's own Python, then restart. Nothing extra needed for this node itself - the SAM model that downloads to ComfyUI/models/sams on first run is for other parts of the pack, not regional sampling.

Common issues & troubleshooting

Only one region seems to apply. Confirm every RegionalPrompt you built is actually wired into a slot on this node, not just left sitting disconnected in the graph - a RegionalPrompt that never reaches CombineRegionalPrompts never reaches RegionalSampler either.

Regions bleed into each other or fight. That's a mask problem upstream on the individual RegionalPrompt nodes, not something this combine step controls - overlapping masks blend by design, so check each region's mask shape before assuming the combine node mismerged something.

This node feels unnecessary for a single region. It usually is - with only one RegionalPrompt, you can often wire its REGIONAL_PROMPTS output straight into RegionalSampler without combining anything. Reach for this node specifically once you're stacking two or more subjects.

The whole regional chain throws an error on execution. This is a genuinely fiddly corner of Impact Pack - regional sampling leans on ComfyUI core internals that have shifted under it before. If the graph errors rather than just producing a bad result, update both Impact Pack and ComfyUI to current before troubleshooting further; that's fixed more regional-sampling crashes than any setting change has.

CategoryImpactPack/Regional

Inputs (1)

NameTypeDefaultDescription
regional_prompts1REGIONAL_PROMPTSinput regional_prompts. (Connecting to the input slot increases the number of additional slots.)

Outputs (1)

NameTypeDescription
REGIONAL_PROMPTSREGIONAL_PROMPTSCombined REGIONAL_PROMPTS