Multi-Layer Mask Editor (5 outputs)
The five-layer version of the mask editor, for smaller graphs
- mask_1
- mask_2
- mask_3
- mask_4
- mask_5
This is the same interactive canvas mask editor as the pack's full Multi-Layer Mask Editor, trimmed to five outputs. Same painting surface, same layers concept, same "reference image by filename" input - just fewer wires on the node and a fixed output count. If you're building a regional prompting or temporal masking graph and you know you'll never need more than five layers, this is the tidier node to drop in. Fewer dangling output ports, less to miswire.
What's different
Where the full editor has num_layers as a 1–10 number and ten mask outputs, this one fixes the output count at five (mask_1 through mask_5) and gives you num_layers as a dropdown of 3, 5, or 10. Set it to 3 and you get a compact three-layer node; set it to 10 and the five outputs stay put - the extra layers are still painted internally and returned, but the fixed five outputs are what you connect. Pick 5 for the obvious use, 3 for minimal graphs, 10 if you're painting a lot and only care about five of them downstream.
Everything else carries over verbatim: the image input is a STRING (the filename of a reference image in ComfyUI/input, not an IMAGE wire - the same trap as the big editor), the canvas lives in the same JavaScript extension, and it's an output node so it runs for preview even when nothing consumes it.
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
Restart, then hard-refresh the browser (Ctrl+Shift+F5) - the paint canvas is JavaScript and won't appear in a stale tab. Painted masks are saved in the workflow JSON, so save before you refresh or your layers vanish.
Which one should you use?
If you don't have a strong reason, the Simple version is the better default - five mask outputs covers the vast majority of regional and temporal workflows, and a node that physically can't grow beyond five outputs keeps you honest about graph complexity. Reach for the ten-output editor when you're doing the full temporal masking stack with several overlapping regions and want each layer wired independently.
Where people get burned
Same two gotchas as the big editor, restated because they're the ones that actually bite: the image field wants a filename string, not an IMAGE connection, and layers you painted are only as durable as your last Ctrl+S. The num_layers dropdown changing out from under you hides layers you painted - set it before you start painting, not after.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| imageopt | STRING | — | |
| num_layersopt | COMBO | 5 | 3 options: 3, 5, 10 |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| mask_1 | MASK | — |
| mask_2 | MASK | — |
| mask_3 | MASK | — |
| mask_4 | MASK | — |
| mask_5 | MASK | — |