ComfyUI Node Runs on cloud

ToMaskList

Bundle your masks into one list

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
ToMaskList
    • MASK
    inputs_len2

    ToMaskList is the mask member of the bmad "make a list" family: it collects several individual MASK inputs and bundles them into a single Python list on one output. Masks show up all over ComfyUI - segmentation results, inpainting regions, attention masks - and the moment you have more than one that needs to travel together to a list-aware node, this is the collection point.

    The input that matters

    inputs_len - the number of input sockets (default 2, up to 32). Set it to 3 and you get mask_0, mask_1, mask_2. Output: a single MASK list. Size the count to what you actually wire in; empty slots become empty entries in the list.

    Why you'd reach for it

    Mostly it's about feeding mask-list consumers and round-tripping with the family's splitters - FromListGetMasks hands the masks back on individual sockets, FromListGet1Mask pulls a single one. If you're compositing several region masks into a pipeline that wants them as a list, or passing masks into a node that iterates over them, ToMaskList is the glue. It keeps the "many wires" and "one list" representations interchangeable so you don't have to rebuild the graph when a node's input type changes.

    The usual family note applies: a MASK list is a Python list of mask tensors, not one stacked batch. When a node's input says "MASK list," that's precisely the shape this produces.

    Installing

    Ships in comfyui_bmad_nodes, bmad4ever's grab-bag of API, CV, and utility nodes. ComfyUI Manager - search "comfyui_bmad_nodes" (or "Bmad Nodes") - install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_bmad_nodes
    cd comfyui_bmad_nodes
    pip install -r requirements.txt
    

    Restart after. No model downloads; pure Python, no opencv needed for the list nodes themselves.

    It's a workhorse utility rather than a headline feature - the kind of node you appreciate only when a workflow suddenly expects masks as a list and you have them on separate wires.

    CategoryBmad/Lists/Make or Intercalate

    Inputs (1)

    NameTypeDefaultDescription
    inputs_lenINT20–32

    Outputs (1)

    NameTypeDescription
    MASKMASK