Nodes/Hellrunner's Magical Nodes/Mask-Map Prompt (HMN)
ComfyUI Node

Mask-Map Prompt (HMN)

Regional prompt weights without doing the math yourself

By Hellrunner2k·Created 2 years ago·Updated about a year ago· 2
Mask-Map Prompt (HMN)
  • Base_Prompt_MMPMix
  • Base_Negative_MMPMix
  • Red_Prompt_MMPMix
  • Red_Negative_MMPMix
  • Green_Prompt_MMPMix
  • Green_Negative_MMPMix
  • Blue_Prompt_MMPMix
  • Blue_Negative_MMPMix
  • Base_Prompt
  • Base_Negative
  • Red_Prompt
  • Red_Negative
  • Green_Prompt
  • Green_Negative
  • Blue_Prompt
  • Blue_Negative
  • Combined_Prompt
  • Combined_Negative
Base_Prompt
Base_Negative
Red_Prompt
Red_Negative
Green_Prompt
Green_Negative
Blue_Prompt
Blue_Negative

Mask-Map Prompt is the text half of Hellrunner's Mask-Maps system. The Load Mask-Map node splits an RGB gradient image into three region masks (red, green, blue) that steer where the model pays attention; this node builds the corresponding prompt stack, so each region gets its own text at its own strength, merged into strings your encoder can eat directly. If you've ever hand-written (subject:1.2),(background:0.8) trying to fake regional prompting, this is the node that builds those strings for you.

The inputs that matter

  • Base_Prompt / Red_Prompt / Green_Prompt / Blue_Prompt - the text for each region, multiline, with dynamic prompts enabled. This is where you describe what lives in each mask area.
  • Base_Negative / Red_Negative / Green_Negative / Blue_Negative - negative text per region.
  • Every one of those eight fields has a matching _MMPMix input (e.g., Red_Prompt_MMPMix). That's where you plug the MMPMix value package from Mask-Map Prompt Mix, which supplies the weights and the ordering.

How it works

The node reads the strengths and order from the mix packages, then for each output walks the sequence you defined. If the order is Base,Red,Green,Blue and your red prompt is "a red sports car", the Red_Prompt output becomes something like (base stuff:1.0),(a red sports car:1.2) - comma-joined, each segment wrapped in ComfyUI's standard (prompt:weight) syntax. Later regions build on earlier ones, which matches how the gradient masks layer: the red "center piece" sits on top of the green theme, which sits on the blue background. Because the output is plain weighted-prompt text, you can drop it straight into any conditioning encoder in the pack (Mojo Maker is the intended target) or any standard CLIPTextEncode.

Outputs

Eight weighted strings - Base_Prompt, Base_Negative, Red_Prompt, Red_Negative, Green_Prompt, Green_Negative, Blue_Prompt, Blue_Negative - plus Combined_Prompt and Combined_Negative, which the tooltip helpfully labels "wip ignore." That's not modesty you should fight: the combined outputs are unfinished, so don't build a workflow that depends on them. Use the per-region strings.

Where people get burned: the weights only apply if you actually feed an MMPMix in. Leave the _MMPMix inputs unconnected and every region silently stays at 1.0 in the default order - the node still works, it just does less than you hoped. And because Order decides which regions appear in which output, a prompt string can include text from regions you didn't intend if you reordered the sequence. Keep the order in sync between your mix node and your mental model of the mask layers.

Installing it

Part of Hellrunner's Magical Nodes - one install covers every node here. Use ComfyUI Manager (search "Hellrunner's Magical Nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Hellrunner2k/ComfyUI-HellrunnersMagicalNodes.git

Restart ComfyUI. No extra dependencies; the node is pure string processing on top of ComfyUI's standard prompt-weight syntax.

Troubleshooting

  • Output text identical to input? The mix inputs are probably unconnected, so weights are all 1.0 and order is default. Wire Mask-Map Prompt Mix in.
  • Weird region bleed in the image? Recheck the Order - if "Red" comes before "Base" in the sequence, the red prompt gets merged into base's early output too.
  • The (prompt:weight) syntax not being honored? Confirm the output string is actually reaching your encoder's prompt input and that your encoder supports weighted conditioning (Mojo Maker and standard CLIP text encoders do).
CategoryHellrunner's/Mask-Maps

Inputs (16)

NameTypeDefaultDescription
Base_PromptoptSTRINGBase Prompt
Base_Prompt_MMPMixoptMMPMIX[object Object]Base Prompt MMPMix value package
Base_NegativeoptSTRINGBase Negative Prompt
Base_Negative_MMPMixoptMMPMIX[object Object]Base Negative Prompt MMPMix value package
Red_PromptoptSTRINGRed Prompt
Red_Prompt_MMPMixoptMMPMIX[object Object]Red Prompt MMPMix value package
Red_NegativeoptSTRINGRed Negative Prompt
Red_Negative_MMPMixoptMMPMIX[object Object]Red Negative Prompt MMPMix value package
Green_PromptoptSTRINGGreen Prompt
Green_Prompt_MMPMixoptMMPMIX[object Object]Green Prompt MMPMix value package
Green_NegativeoptSTRINGGreen Negative Prompt
Green_Negative_MMPMixoptMMPMIX[object Object]Green Negative Prompt MMPMix value package
Blue_PromptoptSTRINGBlue Prompt
Blue_Prompt_MMPMixoptMMPMIX[object Object]Blue Prompt MMPMix value package
Blue_NegativeoptSTRINGBlue Negative Prompt
Blue_Negative_MMPMixoptMMPMIX[object Object]Blue Negative Prompt MMPMix value package

Outputs (10)

NameTypeDescription
Base_PromptSTRINGBase Prompt
Base_NegativeSTRINGBase Negative Prompt
Red_PromptSTRINGRed Prompt
Red_NegativeSTRINGRed Negative Prompt
Green_PromptSTRINGGreen Prompt
Green_NegativeSTRINGGreen Negative Prompt
Blue_PromptSTRINGBlue Prompt
Blue_NegativeSTRINGBlue Negative Prompt
Combined_PromptSTRINGCombined Prompt (wip ignore)
Combined_NegativeSTRINGCombined Negative Prompt (wip ignore)