Nodes/ComfyUI Prompt Control/PCScheduleAddMasks
ComfyUI Node

PCScheduleAddMasks

Wiring up to four masks for regional prompting on the schedule path

By asagi4·Created 3 years ago·Updated about a month ago· 422
PCScheduleAddMasks
  • prompt_schedule
  • mask1
  • mask2
  • mask3
  • mask4
  • PROMPT_SCHEDULE

Multi-subject prompts have one recurring problem: attributes bleed. Ask for a girl with red hair on the left and one with blue hair on the right, and CLIP-style conditioning applies to the whole canvas, so the two swap traits more often than you'd like. That's the entire reason regional prompting exists as a technique, and it's been a stable, unsolved-by-prompting-alone need in this community for years, not a fad. Prompt Control's answer is an implementation of Attention Couple plus cutoff-style masking, and PCScheduleAddMasks is how you actually hand it your mask images.

What it does

It takes a PROMPT_SCHEDULE and up to four optional MASK inputs, and returns a PROMPT_SCHEDULE with those masks attached, ready for the parts of your prompt syntax that reference regions. It's the schedule-pipeline counterpart to PCAddMaskToCLIP, the plain-CLIP node the README documents for attaching masks so PCTextEncode's IMASK function can find them - same idea, but for people building a schedule out of the primitive nodes (PromptToSchedule, FilterSchedule, PCApplySettings) rather than using plain PCTextEncode directly.

The inputs that matter

  • prompt_schedule (required) - the schedule to attach masks to.
  • mask1 through mask4 (all optional MASK) - up to four regions. Wire only as many as you actually need; unused slots are fine left empty.

Four is the ceiling here. If you're trying to compose more than four distinct regions in one image, you're probably past what this node is built for and better served splitting the work across multiple passes or a dedicated compositing approach.

Output is a PROMPT_SCHEDULE carrying the masks forward to whatever consumes the schedule next.

How to install it

  • ComfyUI Manager - search "ComfyUI Prompt Control", install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/asagi4/comfyui-prompt-control, restart ComfyUI.

Requires ComfyUI v0.8.0+.

Common issues & troubleshooting

Masks do nothing on Flux. This is a real, documented limitation, not a mistake on your end: the README states plainly that cutoff-style masking doesn't work with models using non-CLIP text encoders like Flux, and that it's uncertain whether cutoff even makes sense for those architectures. If you're chasing regional control on Flux and it's silently not working, this is why - people asking around for a Flux-compatible alternative to this pack for exactly this reason is a known, recurring thread in the community, not a one-off complaint.

Regions still bleed a little at the edges. That's expected, and honestly the norm for masked-conditioning approaches generally, not specific to this node. The current best practice across regional-prompting implementations is to stop hard-masking once composition has formed early in the schedule and blend back toward the base conditioning for the remaining steps - worth keeping in mind when you're deciding how long a masked segment should stay active in your schedule.

You expected mask_width/mask_height controls here. Those live on PCScheduleSettings, applied separately via PCApplySettings - this node's job is purely attaching the mask images, not configuring the rasterization resolution they're processed at.

Categorypromptcontrol

Inputs (5)

NameTypeDefaultDescription
prompt_schedulePROMPT_SCHEDULE
mask1optMASK
mask2optMASK
mask3optMASK
mask4optMASK

Outputs (1)

NameTypeDescription
PROMPT_SCHEDULEPROMPT_SCHEDULE