Regional Prompt By Color Mask (Inspire)
Paint one color map, get one region per color
- basic_pipe
- color_mask
- scheduler_func_opt
- REGIONAL_PROMPTS
- MASK
Same job as Regional Prompt Simple - build a region for the Impact Pack's regional sampler so different parts of the image get different prompts - but instead of feeding a separate black-and-white mask per region, you feed one color-coded image and pick out a region by its color. Paint a map where the left figure's area is red and the right figure's is blue, hand this node that map and the color #FF0000, and it grabs the red area as your mask.
This is the nicer authoring flow when you've got several regions. Rather than juggling one mask input per region, you draw a single map in any paint tool, then wire up a Regional Prompt By Color Mask per color - each pulling out its own slice. It's regional prompting, which the community keeps reaching for because attribute-bleeding between multiple subjects still isn't reliably solved by prompting alone even on 2026 models.
How it works
You give it a color_mask image and a mask_color (a hex code like #FF0000, or a decimal number). The node extracts the pixels matching that color into a mask, then bundles that region with its prompt and sampler settings - carried in through basic_pipe - into a REGIONAL_PROMPTS entry for Impact's Regional Sampler. It also outputs the extracted MASK so you can see or reuse exactly what it pulled out.
The inputs and outputs that matter
- color_mask - the single color-coded map you painted.
- mask_color - which color to extract as this region (hex
#RRGGBBor decimal). - basic_pipe - model/clip/vae + base conditioning (from
Make Basic Pipe (Inspire)or Impact's pipe nodes). - wildcard_prompt - this region's prompt.
- cfg / sampler_name / scheduler / sigma_factor - per-region sampling settings.
Outputs: REGIONAL_PROMPTS (chain into Impact's Regional Sampler) and MASK (the extracted area).
Installing it
Grab the Inspire Pack in ComfyUI Manager (search "Inspire Pack", install, restart) or:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
Restart afterward (pip install -r requirements.txt if manual).
Where people get tripped up
The color match is exact, so your painted map has to use clean, flat colors. Any anti-aliasing, JPEG artifacts, or gradient at a region's edge means those in-between pixels don't match your mask_color and fall out of the region - save the map as a PNG and paint with hard-edged, pure colors. And like all the regional-prompt nodes, this feeds the Impact Pack's Regional Sampler, so that pack has to be installed for the REGIONAL_PROMPTS output to go anywhere. If you want lighter-weight region control without a separate sampling pass, the Regional Conditioning By Color Mask sibling does the same color-extraction trick but outputs plain CONDITIONING for a normal KSampler.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| basic_pipe | BASIC_PIPE | — | |
| color_mask | IMAGE | — | |
| mask_color | STRING | #FFFFFF | — |
| cfg | FLOAT | 8.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11 | |
| wildcard_prompt | STRING | — | |
| controlnet_in_pipe | BOOLEAN | false | — |
| sigma_factor | FLOAT | 1.000–10 | — |
| variation_seedopt | INT | 00–18446744073709550000 | — |
| variation_strengthopt | FLOAT | 0.000–1 | — |
| variation_methodopt | COMBO | 2 options: linear, slerp | |
| scheduler_func_optopt | SCHEDULER_FUNC | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| REGIONAL_PROMPTS | REGIONAL_PROMPTS | — |
| MASK | MASK | — |