Regional Prompt Interpolation
Hard mask edges got you? Fade between regional prompts instead
- clip
- region_1_mask
- region_2_mask
- region_3_mask
- conditioning
- interpolation_viz
Regional prompting has a telltale flaw: hard mask boundaries. One prompt ends, the next begins, and you can see the seam. This node is the same idea as the pack's Regional Prompting node, except instead of hard edges it interpolates - it builds gradient transition masks between regions so prompt A melts into prompt B instead of cutting to it. Think of it as regional prompting with the feathering tool applied automatically. It's the node you reach for when your region prompts work but the joins look like a collage.
How it works
You hand it up to three regions (mask + prompt + strength), and it generates interpolation_steps gradient steps between each adjacent pair. For every step it builds a transition mask - a soft gradient where region 1 fades out while region 2 fades in - encodes both prompts, and weights the conditioning by that gradient. transition_mode picks the fade curve (linear, smooth, ease_in_out), and gradient_direction picks which way the gradient sweeps.
The clever bit is gradient_direction. It can be explicit (left_to_right, top_to_bottom, radial, and their reverses), or auto - where the node measures the two masks and figures out the dominant axis of separation itself, then fades along it. If your two regions mostly sit side by side, auto does the sensible left-to-right blend without you telling it.
Inputs that matter
clip,base_positive- same as the plain Regional Prompting node; base prompt applies everywhere.interpolation_steps- how many gradient steps between regions, 2–20, default 5. Higher = smoother but slower to evaluate.region_1/2/3_mask,region_1/2/3_prompt,region_1/2/3_strength- your regions, same as before.transition_mode,gradient_direction- the fade curve and sweep direction.
Outputs are conditioning (into the sampler's positive input) and interpolation_viz - a MASK that visualizes the interpolation. Wire interpolation_viz to a preview to see exactly where the fades land before you commit a full generation.
Installing it
The standard pack install - ComfyUI Manager (search "curved_weight_schedule") or:
cd ComfyUI/custom_nodes
git clone https://github.com/diffussy69/comfyui-curved_weight_schedule
pip install matplotlib pillow numpy torch scipy if needed, restart, hard-refresh. No model downloads, no Advanced ControlNet required - like its sibling, this node works on a plain CLIP.
Where people get burned
The whole point is smoothness, so cranking interpolation_steps to 2 is how you get a hard edge anyway - leave it at 5 or above. And if you only have two regions with wildly different compositions (face vs. distant street), interpolation will dutifully blend them into mush at the boundary; that's the one case where the hard-edged sibling is the better tool. Use this for adjacent subjects, not worlds-apart scenes.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| base_positive | STRING | Base prompt applied everywhere | |
| interpolation_steps | INT | 52–20 | Number of gradient steps between regions |
| region_1_maskopt | MASK | — | |
| region_1_promptopt | STRING | — | |
| region_1_strengthopt | FLOAT | 1.000–10 | — |
| region_2_maskopt | MASK | — | |
| region_2_promptopt | STRING | — | |
| region_2_strengthopt | FLOAT | 1.000–10 | — |
| region_3_maskopt | MASK | — | |
| region_3_promptopt | STRING | — | |
| region_3_strengthopt | FLOAT | 1.000–10 | — |
| transition_modeopt | COMBO | 3 options: linear, smooth, ease_in_out | |
| gradient_directionopt | COMBO | 6 options: auto, left_to_right, right_to_left, top_to_bottom, bottom_to_top, radial | |
| show_debugopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| interpolation_viz | MASK | — |