Nodes/ComfyUI-curved_weight_schedule/Multi-Mask Combiner (Batch, 10 layers)
ComfyUI Node

Multi-Mask Combiner (Batch, 10 layers)

The temporal mask combiner, expanded to ten layers

By diffussy69·Created 11 months ago·Updated 9 months ago· 2
Multi-Mask Combiner (Batch, 10 layers)
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • mask_6
  • mask_7
  • mask_8
  • mask_9
  • mask_10
  • mask_batch
  • schedule_graph
  • schedule_info
num_keyframes10
start_percent0.000
end_percent1.000
layer_1_separator━━━━━━━━━━ LAYER 1 ━━━━━━━━━━
strength_11.00
start_percent_10.00
end_percent_11.00
layer_2_separator━━━━━━━━━━ LAYER 2 ━━━━━━━━━━
strength_21.00
start_percent_20.00
end_percent_21.00
layer_3_separator━━━━━━━━━━ LAYER 3 ━━━━━━━━━━
strength_31.00
start_percent_30.00
end_percent_31.00
layer_4_separator━━━━━━━━━━ LAYER 4 ━━━━━━━━━━
strength_41.00
start_percent_40.00
end_percent_41.00
layer_5_separator━━━━━━━━━━ LAYER 5 ━━━━━━━━━━
strength_51.00
start_percent_50.00
end_percent_51.00
layer_6_separator━━━━━━━━━━ LAYER 6 ━━━━━━━━━━
strength_61.00
start_percent_60.00
end_percent_61.00
layer_7_separator━━━━━━━━━━ LAYER 7 ━━━━━━━━━━
strength_71.00
start_percent_70.00
end_percent_71.00
layer_8_separator━━━━━━━━━━ LAYER 8 ━━━━━━━━━━
strength_81.00
start_percent_80.00
end_percent_81.00
layer_9_separator━━━━━━━━━━ LAYER 9 ━━━━━━━━━━
strength_91.00
start_percent_90.00
end_percent_91.00
layer_10_separator━━━━━━━━━━ LAYER 10 ━━━━━━━━━━
strength_101.00
start_percent_100.00
end_percent_101.00
combine_separator━━━━━━━━━━ COMBINE ━━━━━━━━━━
combine_methodmax
normalizetrue
fade_in_percent0.00
fade_out_percent0.00
display_separator━━━━━━━━━━ DISPLAY ━━━━━━━━━━
show_graphtrue
print_schedulefalse

Same engine, more lanes. The pack's 5-layer Multi-Mask Combiner (Batch) generates a batch of masks where each keyframe represents a different time window of generation - the "face first, then hands, then background" trick. This is the ten-layer version, for schedules with more moving parts than five regions can express. If you've ever wanted a mask schedule that cycles through regions sequentially like a storyboard - left, center, right, then everything - ten layers is where that stops feeling cramped.

What's different

The mechanism is identical: each of ten layers gets a mask_N, strength_N, start_percent_N, and end_percent_N, and the node samples num_keyframes snapshots across the timeline, combining active layers per snapshot with combine_method (max, add, multiply, or average), plus the shared fade_in_percent / fade_out_percent for soft ramps and normalize to clamp. The batch-level num_keyframes, start_percent, and end_percent behave the same.

The one thing to keep in mind: combine_method in this pack's batch combiners is max/add/multiply/average - the README's example workflow talks about max being recommended, and that still holds here. max keeps overlapping layers from stacking past 1.0 and is the safest start.

Outputs are the same trio as the five-layer version: mask_batch (into the Advanced Curved ControlNet Scheduler's batch_masks), schedule_graph (the IMAGE timeline preview - use it, it catches mistakes before you spend a generation), and schedule_info (text).

The use case that justifies ten layers

The README's sequential focus example - left third of the frame for 0–25%, middle for 25–50%, right for 50–75%, full image to finish - really does want more than five slots once you add fades and overlap. Ten layers lets you keep that whole choreography in one node instead of chaining two five-layer combiners.

Installing it

Same pack:

cd ComfyUI/custom_nodes
git clone https://github.com/diffussy69/comfyui-curved_weight_schedule
pip install matplotlib pillow numpy torch scipy

Temporal masking downstream means the modified Advanced ControlNet fork is required for the full pipeline (per-keyframe image support), and you'll get the Could not import TimestepKeyframe error without Advanced ControlNet present at all.

Where people get burned

Ten layers means ten chances for a default 0–1 time window to silently make a mask active for the whole generation - the "all keyframes look the same" failure. Set genuinely different start_percent/end_percent per layer, and pair with the pack's Redistribute Keyframe Percents node so the scheduler's keyframes actually spread across the timeline. The schedule_graph is your early-warning system; if it shows everything overlapping, fix the windows before generating.

Categorymask/batch

Inputs (61)

NameTypeDefaultDescription
num_keyframesINT102–200
start_percentFLOAT0.0000–1
end_percentFLOAT1.0000–1
layer_1_separatorCOMBO━━━━━━━━━━ LAYER 1 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 1 ━━━━━━━━━━
mask_1MASK
strength_1FLOAT1.000–2
start_percent_1FLOAT0.000–1
end_percent_1FLOAT1.000–1
layer_2_separatoroptCOMBO━━━━━━━━━━ LAYER 2 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 2 ━━━━━━━━━━
mask_2optMASK
strength_2optFLOAT1.000–2
start_percent_2optFLOAT0.000–1
end_percent_2optFLOAT1.000–1
layer_3_separatoroptCOMBO━━━━━━━━━━ LAYER 3 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 3 ━━━━━━━━━━
mask_3optMASK
strength_3optFLOAT1.000–2
start_percent_3optFLOAT0.000–1
end_percent_3optFLOAT1.000–1
layer_4_separatoroptCOMBO━━━━━━━━━━ LAYER 4 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 4 ━━━━━━━━━━
mask_4optMASK
strength_4optFLOAT1.000–2
start_percent_4optFLOAT0.000–1
end_percent_4optFLOAT1.000–1
layer_5_separatoroptCOMBO━━━━━━━━━━ LAYER 5 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 5 ━━━━━━━━━━
mask_5optMASK
strength_5optFLOAT1.000–2
start_percent_5optFLOAT0.000–1
end_percent_5optFLOAT1.000–1
layer_6_separatoroptCOMBO━━━━━━━━━━ LAYER 6 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 6 ━━━━━━━━━━
mask_6optMASK
strength_6optFLOAT1.000–2
start_percent_6optFLOAT0.000–1
end_percent_6optFLOAT1.000–1
layer_7_separatoroptCOMBO━━━━━━━━━━ LAYER 7 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 7 ━━━━━━━━━━
mask_7optMASK
strength_7optFLOAT1.000–2
start_percent_7optFLOAT0.000–1
end_percent_7optFLOAT1.000–1
layer_8_separatoroptCOMBO━━━━━━━━━━ LAYER 8 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 8 ━━━━━━━━━━
mask_8optMASK
strength_8optFLOAT1.000–2
start_percent_8optFLOAT0.000–1
end_percent_8optFLOAT1.000–1
layer_9_separatoroptCOMBO━━━━━━━━━━ LAYER 9 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 9 ━━━━━━━━━━
mask_9optMASK
strength_9optFLOAT1.000–2
start_percent_9optFLOAT0.000–1
end_percent_9optFLOAT1.000–1
layer_10_separatoroptCOMBO━━━━━━━━━━ LAYER 10 ━━━━━━━━━━1 options: ━━━━━━━━━━ LAYER 10 ━━━━━━━━━━
mask_10optMASK
strength_10optFLOAT1.000–2
start_percent_10optFLOAT0.000–1
end_percent_10optFLOAT1.000–1
combine_separatoroptCOMBO━━━━━━━━━━ COMBINE ━━━━━━━━━━1 options: ━━━━━━━━━━ COMBINE ━━━━━━━━━━
combine_methodoptCOMBOmax4 options: max, add, multiply, average
normalizeoptBOOLEANtrue
fade_in_percentoptFLOAT0.000–0.5
fade_out_percentoptFLOAT0.000–0.5
display_separatoroptCOMBO━━━━━━━━━━ DISPLAY ━━━━━━━━━━1 options: ━━━━━━━━━━ DISPLAY ━━━━━━━━━━
show_graphoptBOOLEANtrue
print_scheduleoptBOOLEANfalse

Outputs (3)

NameTypeDescription
mask_batchMASK
schedule_graphIMAGE
schedule_infoSTRING