Nodes/ComfyUI-curved_weight_schedule/Regional Prompt Interpolation
ComfyUI Node

Regional Prompt Interpolation

Hard mask edges got you? Fade between regional prompts instead

By diffussy69·Created 11 months ago·Updated 9 months ago· 2
Regional Prompt Interpolation
  • clip
  • region_1_mask
  • region_2_mask
  • region_3_mask
  • conditioning
  • interpolation_viz
base_positive
interpolation_steps5
region_1_prompt
region_1_strength1.00
region_2_prompt
region_2_strength1.00
region_3_prompt
region_3_strength1.00
transition_mode
gradient_direction
show_debugfalse

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.

Categoryconditioning

Inputs (15)

NameTypeDefaultDescription
clipCLIP
base_positiveSTRINGBase prompt applied everywhere
interpolation_stepsINT52–20Number of gradient steps between regions
region_1_maskoptMASK
region_1_promptoptSTRING
region_1_strengthoptFLOAT1.000–10
region_2_maskoptMASK
region_2_promptoptSTRING
region_2_strengthoptFLOAT1.000–10
region_3_maskoptMASK
region_3_promptoptSTRING
region_3_strengthoptFLOAT1.000–10
transition_modeoptCOMBO3 options: linear, smooth, ease_in_out
gradient_directionoptCOMBO6 options: auto, left_to_right, right_to_left, top_to_bottom, bottom_to_top, radial
show_debugoptBOOLEANfalse

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
interpolation_vizMASK