Nodes/ComfyUI Inspire Pack/Regional Prompt By Color Mask (Inspire)
ComfyUI Node Runs on cloud

Regional Prompt By Color Mask (Inspire)

Paint one color map, get one region per color

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Regional Prompt By Color Mask (Inspire)
  • basic_pipe
  • color_mask
  • scheduler_func_opt
  • REGIONAL_PROMPTS
  • MASK
mask_color#FFFFFF
cfg8.00
sampler_name
scheduler
wildcard_prompt
controlnet_in_pipefalse
sigma_factor1.00
variation_seed0
variation_strength0.00
variation_method

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 #RRGGBB or 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.

CategoryInspirePack/Regional

Inputs (13)

NameTypeDefaultDescription
basic_pipeBASIC_PIPE
color_maskIMAGE
mask_colorSTRING#FFFFFF
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11
wildcard_promptSTRING
controlnet_in_pipeBOOLEANfalse
sigma_factorFLOAT1.000–10
variation_seedoptINT00–18446744073709550000
variation_strengthoptFLOAT0.000–1
variation_methodoptCOMBO2 options: linear, slerp
scheduler_func_optoptSCHEDULER_FUNC

Outputs (2)

NameTypeDescription
REGIONAL_PROMPTSREGIONAL_PROMPTS
MASKMASK