Nodes/GraftingRayman/GR Multi Mask Create
ComfyUI Node

GR Multi Mask Create

Up to eight masks from one node

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
GR Multi Mask Create
    • mask1
    • mask2
    • mask3
    • mask4
    • mask5
    • mask6
    • mask7
    • mask8
    height
    width
    num_masks1

    Where GR Mask gives you one shaped mask and GR Mask Create Random Multi scatters random ones, this node's job is producing several distinct masks at once, each on its own output socket - up to eight of them from a single node instead of eight separate mask generators wired in parallel.

    How it works

    The parameter list is deliberately short - just a canvas height/width and num_masks (1–8) - which is the tell for what this node is actually doing: with no shape, position, or size parameters exposed per mask, it's built to divide the canvas into num_masks regions and hand each one back on its own dedicated output (mask1 through mask8), rather than let you configure each mask's shape and placement individually the way GR Mask does. If you set num_masks to 3, expect three of the eight outputs to carry real masks and the rest to be empty/unused - wire only as many as you actually set.

    That makes it a fit for grid-style or region-split use cases: dividing an image into quadrants or a strip of regions for parallel processing, batch inpainting of several distinct areas in one pass, or feeding several downstream nodes (say, per-region color grading or per-region conditioning) from a single mask source instead of managing eight separate generator nodes with their own settings to keep in sync.

    The inputs and outputs that matter

    • height / width - the canvas the masks are generated against.
    • num_masks (INT, default 1, max 8) - how many of the eight output slots actually get a mask.
    • mask1 through mask8 (MASK, outputs) - one socket per region. Only wire the ones corresponding to your num_masks setting; the rest won't have anything meaningful on them.

    How to install it

    Via ComfyUI Manager: search "GraftingRayman", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman
    

    then restart. Every node in the pack, this one included, needs OpenAI's CLIP package installed on top of ComfyUI's own CLIP handling:

    # portable build
    .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git
    
    # system python
    pip install git+https://github.com/openai/CLIP.git
    

    Common issues & troubleshooting

    Node missing from search. That's the CLIP install above, a pack-wide dependency rather than something about masking specifically.

    Extra output sockets look empty or unused. Expected - only the first num_masks outputs carry real masks. If you set num_masks to 4, don't expect anything usable on mask5 through mask8.

    Masks don't line up the way you expected across regions. With no per-mask shape or position controls exposed, this node is built for an even, systematic split of the canvas rather than custom-placed regions. If you need each mask individually shaped and positioned, that's a job for several GR Mask nodes wired in parallel instead - this node trades that flexibility for convenience when an even split is all you need.

    CategoryGraftingRayman/Mask

    Inputs (3)

    NameTypeDefaultDescription
    heightINT
    widthINT
    num_masksINT11–8

    Outputs (8)

    NameTypeDescription
    mask1MASK
    mask2MASK
    mask3MASK
    mask4MASK
    mask5MASK
    mask6MASK
    mask7MASK
    mask8MASK