Grid Style (Border)
One ring per cell, and the auto colour is the good one
- style
- style
Grid Style (Border) does one thing to a grid: draws a ring around each cell. It's the piece of the all-in-one Grid Style node you'd actually fiddle with, split out so you can build it into a chain - and so every field is a native, pipeable widget rather than something inside a config panel. That's the whole reason it exists: border_angle should be able to come from a primitive, and here it can.
The fields
border_width is the ring thickness in pixels, 0 to 512, and 0 means no border at all - no matter what the colours say. border_radius (default 10) rounds the cell corners; the compositor anti-aliases them off a signed distance field, so the corners stay smooth whether your cells are 320px or 4K, which is not true of the supersampling approach most nodes use.
border_mode picks between three genuinely different looks:
- solid - one colour, from
border_color. - gradient - a two-colour ring from
border_colortoborder_color2(default#6366f1, a nice indigo) alongborder_anglein degrees, 0 to 360. - auto - sampled from each image, per cell.
auto is the interesting one and the reason I'd reach for this node over a plain frame. It computes a saturation-weighted average of each cell's pixels, weights vivid pixels higher than flat or grey ones, and then pushes the result away from grey with a boost. So a mostly-grey screenshot with one red splash gets a red border, not a beige one. On a grid of mixed images it produces a colour scheme that looks intentional, per cell, without you touching a colour picker nine times.
Colours accept #hex, rgb(…) or a CSS colour name - anything Pillow's colour parser eats. Junk falls back to white rather than crashing, which is either forgiving or silently wrong, depending on how much you trust your own typing.
Optional input style, optional output style. Unwired, it starts from defaults; wired, it overlays only the keys it owns and passes the rest through.
Where it sits in a chain
Grid Style (Layout) → Grid Style (Border) → Grid Style (Shadow) → Grid From Images
Order between the different aspects genuinely doesn't matter - they own disjoint keys - but chaining Shadow after Border is the sensible habit, since shadow_match on the Shadow node reads the auto-border colour that this node produced. Border first, shadow second. That's the whole convention.
Install
Manager → search Nynxz → ComfyUI-NynxzNodes, or:
comfy node install comfyui-nynxz-nodes
From source:
cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-NynxzNodes
cd ComfyUI-NynxzNodes
pnpm install && pnpm build
Restart afterwards. No models, no dependencies beyond what ComfyUI already has.
Troubleshooting
Nothing happens. Nine times out of ten, border_width is 0. The second most common: the style output goes to the grid's background input instead of style. Both are optional inputs on the grid node, so nothing complains - you just get defaults.
Gradient looks flat. border_color and border_color2 are the same colour, or border_angle is making the transition happen across a dimension that's only 30px wide. On a thin ring the gradient reads along the cell, not the ring, so short cells compress it.
Auto borders are all grey. Your images are grey. The auto colour is a saturation-weighted average with a boost; there's no saturation to weight.
The chain "loses" a border set upstream. That's by design - the aspect nodes overwrite the keys they own. If an upstream style had a 6px border and this node says 0, you get 0. To keep an upstream border and change nothing, don't wire a Border node at all.
One honest note: this is a cosmetic node for a cosmetic feature. Don't go looking for a hidden throughput setting. It draws rectangles.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| border_width | INT | 00–512 | Ring thickness, px (0 = no border). |
| border_mode | COMBO | solid | solid = one colour · gradient = 2-colour ring · auto = sampled from each image. |
| border_color | STRING | #ffffff | Solid colour / gradient start (#hex, rgb(…) or a colour name). |
| border_color2 | STRING | #6366f1 | Gradient end colour (gradient mode only). |
| border_angle | INT | 450–360 | Gradient direction, degrees. |
| border_radius | INT | 100–8192 | Corner radius, px. |
| styleopt | NYNXZ_GRID_STYLE | Upstream style to extend. Unwired = start a fresh style from defaults. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| style | NYNXZ_GRID_STYLE | Wire on to the next Grid Style node, or into a grid node. |