Nodes/H3 Studio/H3 Regional Prompt (mask)
ComfyUI Node

H3 Regional Prompt (mask)

Tell H3 what belongs inside the mask

By shootthesound·Created about a month ago·Updated 25 days ago· 29
H3 Regional Prompt (mask)
  • model
  • clip
  • conditioning
  • mask
  • MODEL
region_text
strength1.5
containment0.50
mask_feather0.10

H3 Regional Prompt (mask) is the missing half of the Soft Denoise Zone. The zone node says where change is allowed; this one says what belongs there. It biases H3's attention so a fragment of your prompt describes the masked region specifically - the zone's pixels listen harder to those words, and the rest of the frame stops listening to them. It's billed as the first regional prompting on H3, it's marked experimental, and it's a small node with two big ideas.

What it's for

Pair it with the Soft Denoise Zone and the same mask, and you can do a proper region swap: restyle the person in the mask and tell the model what they are. But it also works with no v2v at all - place a subject spatially in plain generation. Your prompt says "…a woman in a red coat walks through the market…", the node biases the masked area toward the words "a woman in a red coat", and the woman lands there instead of wherever the model felt like putting her.

How it works

The clever bit is that it doesn't invent new conditioning - it amplifies what's already in your prompt. The node reads the positive conditioning's carried prompt text, finds your fragment, and uses the H3 text encoder to measure the fragment's token span. Then it wraps the model's forward pass with an additive attention-logit bias: pixels inside the mask get pulled toward those tokens (that's strength), and pixels outside get a negative bias toward them (that's containment, so the description doesn't leak across the whole frame). Same family of trick as Forge Couple and Attention Couple on images - regional prompting via attention bias - ported to H3's unified context.

The inputs that matter

  • conditioning - the Guide node's positive conditioning. It's read-only: the same conditioning still goes to the sampler as usual. This is where the node gets the prompt text.
  • clip - the H3 text encoder, used to measure the fragment's token span.
  • region_text - the part of the prompt that describes what belongs in the region. It must appear verbatim in the prompt - copy-paste it, don't retype. If it's not in the prompt, the node errors.
  • strength - the additive bias. ~1.0–2.5 is the expected usable range; too high degrades composition. 0 disarms the node entirely.
  • containment - fraction of strength applied as a negative bias from pixels outside the mask. 0 = attract only.
  • mask - where the fragment belongs. Single mask = whole clip; a per-frame batch follows the subject through time. Same input as the Soft Denoise Zone - share the wire.

One output, MODEL, wired to the sampler. If you use both regional and zone nodes, stack them: model → zone node → regional node → sampler, and feed the regional node's conditioning from the Guide node's positive output.

Where people get burned

Two errors dominate, and both are the node being honest with you. "region_text is not part of the prompt" means exactly that - check for trailing spaces or reworded fragments. "The conditioning does not carry its prompt text" means you fed it a conditioning that wasn't produced by the H3 Studio node - feed it the Guide node's positive output and re-run. The README also says one regional node per graph for now. If the described subject starts bleeding elsewhere, raise containment; if composition falls apart, lower strength. Both directions are a 30-second experiment.

Install

Same as the pack: Manager (search "H3 Studio") or cd ComfyUI/custom_nodes && git clone https://github.com/shootthesound/ComfyUI-H3Studio, restart, hard-refresh (Ctrl+Shift+R). Needs ComfyUI with MiniMax H3 support (v0.30.0+); no extra Python dependencies.

Categorymodel/conditioning/minimax

Inputs (8)

NameTypeDefaultDescription
modelMODEL
clipCLIPThe H3 text encoder — used to measure the fragment's token span.
conditioningCONDITIONINGThe Guide node's positive conditioning (read-only — it carries the final prompt text). The SAME conditioning still goes to the sampler as usual.
region_textSTRINGThe part of the prompt that describes what belongs in the masked region. Must appear VERBATIM in the prompt (copy-paste it). Example: prompt '...a woman in a red coat walks through the market...' -> region_text 'a woman in a red coat'.
strengthFLOAT1.50–5Additive attention-logit bias pulling the region's pixels toward the fragment's tokens. ~1.0-2.5 is the expected usable range; too high degrades composition. 0 disarms the node.
containmentFLOAT0.500–1Fraction of strength applied as a NEGATIVE bias from pixels OUTSIDE the mask to the fragment's tokens — keeps the description from leaking into the rest of the frame. 0 = attract only.
mask_featherFLOAT0.100–0.5Softens the mask outward (fraction of the short side), interior kept at full strength — same dial as the Soft Denoise Zone.
maskMASKWHERE the fragment belongs. Single mask = whole clip; a per-frame batch (SAM2 video segmentation) follows the subject through time. Same input as the Soft Denoise Zone — share the wire.

Outputs (1)

NameTypeDescription
MODELMODELWire to the sampler in place of the plain model (stack after the Soft Denoise Zone if both are used).