ComfyUI Node

Grid Style

The whole look of your contact sheet in one wire

By Nynxz·Created 11 months ago·Updated about 12 hours ago· 4
Grid Style
  • config
  • style
◄columns3►
◄size_modecells►
◄cell_width320►
◄cell_height180►
◄canvas_width1280►
◄canvas_height720►
◄gap_x12►
◄gap_y12►
◄padding24►
◄fitcover►

Grid Style is the settings node for the grid nodes in this pack. Grid From Images will compose a contact sheet out of defaults, but the defaults are plain - 3 columns, 320×180 cells, rounded corners, a shadow. Grid Style is where you change any of that, and because its output is a link rather than baked-in values, one style node can drive several grids.

It's also the node that makes the pack's chained variants make sense. There are three more - Layout, Border, Shadow - which do the same job in pieces. This is the all-in-one: ten native widgets for geometry, plus a rich panel for the border, shadow and colour work.

Geometry is native, the pretty stuff is a panel

The split is deliberate and it's the first thing to understand. The ten geometry fields are ordinary ComfyUI inputs: columns (3, up to 64), size_mode (cells = fixed cell size, canvas derived; canvas = fixed canvas, cells derived), cell_width/cell_height (320/180), canvas_width/canvas_height (1280/720), gap_x/gap_y (12/12), padding (24) and fit (cover crops, contain letterboxes).

Because they're native, you can drive any of them from another node or promote them to a subgraph input. Bump the grid to 6 columns with a primitive and the whole sheet re-lays out. That's the difference between a style node and a settings dialog.

Everything else lives on the config widget (NYNXZ_GRID_STYLE_CONFIG): border width, border mode (solid, two-colour gradient, or auto sampled per image), the two border colours, gradient angle, corner radius, and the shadow - mode drop or glow, blur, offsets, colour, opacity, and shadow_match, which tints the glow with each cell's auto-border colour so the bloom picks up the image's own dominant colour. Bordered cells with a matching glow is the look everyone makes with this node, and it's two fields.

Defaults are worth knowing because they're why your first grid already looks finished: border 0px with a 10px radius, and a shadow on - 18px blur, 10px down, 45% black. Turn the shadow off and a grid instantly looks like a spreadsheet.

Output, and mixing with the chain nodes

One output: style. Wire it into Grid From Images - or into a Layout / Border / Shadow node if you want to override one aspect of it. Because all four nodes speak the same NYNXZ_GRID_STYLE type whatever order you chain them in, a Grid Style's output can feed an aspect node to change just the border, or a Border→Shadow chain can feed a grid directly with the all-in-one node nowhere in sight. The aspect nodes each own a disjoint set of keys, so order between different aspects genuinely doesn't matter, and the grid fills anything unset from defaults.

Optional input: config. That's it. Nothing to compute, nothing to sample.

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. No models, no Python dependencies.

I'll say the same thing here as on every node in this pack because it bites this node hardest: web/ is gitignored in the repo, so git clone alone gets you the geometry widgets and not the config panel. Border colours, gradient angle, shadow - all of it is panel-only. Manager and the registry install ship the built frontend; a source install needs pnpm install && pnpm build before the panel exists.

Troubleshooting

Border settings appear to do nothing. border_width defaults to 0, which means no border regardless of colours and mode. The panel has the same order of operations as the panel-less Border node: width 0 = off.

Cells are the wrong shape. If size_mode = cells, the canvas is derived, so canvas_width/canvas_height are ignored entirely and editing them is a very quiet no-op. Same in reverse. The two sets of fields look equally live in the panel and only one pair is.

The shadow is clipped. The compositor handles negative and out-of-bounds offsets by clipping at the canvas, so a big shadow_blur with a large offset will get cut at the frame edge. padding is your fix - it's the space between the cells and the canvas edge, and shadows need room.

Two grids, two looks. They're reading different styles, or one is unwired. A style is a plain dict of values; there's no global state, so nothing carries over unless you wire it there.

Honestly, the appeal here is aesthetic and it's fine to admit it. A grid of images with rounded corners and a soft drop shadow looks like a finished thing, and the same grid with hard edges on a black background looks like a debug view. If you're posting the output anywhere, this node is why it looks deliberate.

CategoryNynxz/Grid

Inputs (11)

NameTypeDefaultDescription
columnsINT31–64Cells per row.
size_modeCOMBOcellscells = fixed cell size, canvas derived · canvas = fixed canvas, cells derived.
cell_widthINT3201–16384Cell width, px (used when size_mode = cells).
cell_heightINT1801–16384Cell height, px (used when size_mode = cells).
canvas_widthINT128016–16384Canvas width, px (used when size_mode = canvas).
canvas_heightINT72016–16384Canvas height, px (used when size_mode = canvas).
gap_xINT120–8192Horizontal gap between cells, px.
gap_yINT120–8192Vertical gap between cells, px.
paddingINT240–8192Outer padding around the grid, px.
fitCOMBOcovercover = crop to fill the cell · contain = letterbox inside it.
configoptNYNXZ_GRID_STYLE_CONFIG—

Outputs (1)

NameTypeDescription
styleNYNXZ_GRID_STYLEWire into one or more grid nodes.