Nodes/comfyui-mixlab-nodes/Grid Input ♾️Mixlab
ComfyUI Node Runs on cloud

Grid Input ♾️Mixlab

Define named regions for the pack's grid layout system

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
Grid Input ♾️Mixlab
    • grids
    • labels
    • image
    grids
    padding24
    width
    height

    Mixlab's grid/region system has an automatic side and a manual side. SplitImage is the automatic one - give it an image and a cell count, it divides the canvas evenly. Grid Input is the manual counterpart: you define the regions and their labels yourself, region by region, instead of asking for an even split. Both feed the same _GRID type into the pack's regional-prompt tooling (its GLIGEN-based node accepts exactly this type), so this is the node to reach for when you need specific, hand-placed regions rather than a uniform grid.

    How it works

    grids is where you author the layout, padding adds spacing around each defined region, and the optional width/height pin the canvas dimensions the regions are defined against. What comes out is a list of _GRID entries plus a matching list of labels - one per region - and an image, which is likely a rendered preview of the layout given this is an input-category node with its own on-canvas widget.

    One honest caveat: the exact text format for the grids field isn't documented anywhere in the pack's README or the node's schema. Rather than guess at a syntax and get it wrong, treat this as a node meant to be driven through its own widget in the ComfyUI canvas, and lean on the pack's example layer/poster workflows in the repo if you want a known-working starting point to copy from.

    The inputs and outputs that matter

    • grids (STRING, multiline, default empty, required) - where the region layout is authored.
    • padding (INT, default 24, range -5005000, required) - spacing added around each region, in pixels.
    • width / height (INT, optional) - pin the canvas size the regions map onto.

    Outputs: grids (_GRID, list) and labels (STRING, list) - one pair per defined region - plus image, a rendering of the layout.

    How to install it

    Ships with the Mixlab pack.

    • ComfyUI Manager: search comfyui-mixlab-nodes, install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git, install requirements (install.bat on Windows, or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt), restart.

    No model downloads for this node.

    Common issues & troubleshooting

    Not sure how to write the grids field. Don't hand-type a free-form format and hope it parses - this node is meant to be defined through its own widget in the node canvas. If you're stuck, look at the pack's shipped example workflows around its layers/poster features for a working reference rather than reverse-engineering the syntax from scratch.

    Layout gets crushed or overflows. padding is in pixels, not a percentage - a large padding value on a small canvas eats the whole layout, so scale it to your actual width/height.

    Downstream node rejects the output. grids and labels are Mixlab-specific types - they only connect cleanly to sibling nodes (GridOutput, GridDisplayAndSave, the pack's GLIGEN regional-apply node), not generic list or string nodes from other packs.

    Category♾️Mixlab/Input

    Inputs (4)

    NameTypeDefaultDescription
    gridsSTRING
    paddingINT24-500–5000
    widthoptINT
    heightoptINT

    Outputs (3)

    NameTypeDescription
    grids_GRID
    labelsSTRING
    imageIMAGE