Grid Input ♾️Mixlab
Define named regions for the pack's grid layout system
- grids
- labels
- image
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, default24, range-500–5000, 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.baton 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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| grids | STRING | — | |
| padding | INT | 24-500–5000 | — |
| widthopt | INT | — | |
| heightopt | INT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| grids | _GRID | — |
| labels | STRING | — |
| image | IMAGE | — |