Nodes/ComfyUI-H3Studio/H3 Regional Prompt (mask)
ComfyUI Node

H3 Regional Prompt (mask)

Bias H3's attention so a fragment of the prompt describes the MASKED region specifically: the zone's pixels listen harder to those words, the rest of the frame stops listening to them. Pairs with the Soft Denoise Zone (same mask) for region swaps; also places subjects spatially in plain generation. EXPERIMENTAL — first regional prompting on H3.

By shootthesound·Created 13 days ago·Updated 5 days ago· 20
H3 Regional Prompt (mask)
  • model
  • clip
  • conditioning
  • mask
  • MODEL
region_text
strength1.5
containment0.50
mask_feather0.10
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).