Nodes/RES4LYF/Masks Unpack 4
ComfyUI Node Runs on cloud

Masks Unpack 4

Split a mask list into four wireable outputs

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
Masks Unpack 4
  • masks
  • masks
  • masks
  • masks
  • masks

A small but genuinely useful plumbing node. ComfyUI nodes that produce a list of masks - like RES4LYF's own Masks-From-Color-Swatches, which returns one mask per color swatch as a list - don't fan out cleanly into individually-wired sockets on their own. Masks Unpack 4 does exactly what its own description says: it "unpacks a list of masks into separate outputs," in this case exactly four of them.

You'll want this specifically when you've built up to four masked regions - say, four zones for RES4LYF's regional conditioning feature - and you need each one plugged into its own downstream node (its own conditioning, its own KSamplerGuides latent_guide_mask, whatever your workflow calls for) rather than left bundled as one list.

How it works

Feed it a masks list, and it returns four separate masks outputs in order - the first item in the list to the first output socket, and so on. If your list has fewer than four masks, the extra output sockets simply won't have meaningful content; if it has more than four, anything past the fourth is dropped.

The inputs and outputs that matter

  • masks (required) - the list of masks to split, typically produced by a list-output node earlier in your graph.
  • Four masks outputs - each one an individual MASK you can wire independently. ComfyUI labels them identically in the schema, so match them up by output position (top to bottom) against your source list's order.

How to install it

Via ComfyUI Manager: search "RES4LYF" and install. Manually, from ComfyUI/custom_nodes:

git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

Activate your venv first if you use one; on portable installs, use python_embedded\Scripts\pip.exe in place of pip. Restart ComfyUI once installed.

Common issues & troubleshooting

One of the four outputs is blank or errors downstream. Count your source list first - if Masks-From-Color-Swatches (or whatever produced your list) only returned three masks, the fourth output here has nothing real behind it. Leave unused outputs disconnected rather than wiring them into something that expects real content.

You have more than four regions. This node is fixed at four outputs by design - for more, use Masks-Unpack-8 or Masks-Unpack-16 instead, sized to whatever you actually need. There's no dynamic-size version; pick the fixed size that covers your zone count.

You can't tell which output corresponds to which mask. Since all four output sockets share the same label in the UI, trace them by position rather than name - the order matches the order of masks in your input list, which in turn usually matches the order you defined your color swatches or drew your regions in.

You only need one mask, not four. If you're not actually working with a list, this node is the wrong tool entirely - wire your single MASK output straight into whatever needs it, no unpacking required.

CategoryRES4LYF/masks

Inputs (1)

NameTypeDefaultDescription
masksMASK

Outputs (4)

NameTypeDescription
masksMASK
masksMASK
masksMASK
masksMASK