Nodes/ComfyLab Pack/Plot Config: Grid (lab)
ComfyUI Node

Plot Config: Grid (lab)

Style the XY Plot grid without touching a pixel of the pipeline

By bugltd·Created 2 years ago·Updated about a year ago· 11
Plot Config: Grid (lab)
    • plot_config_grid
    gap20
    background_color#b9b9b9
    fontRoboto-Regular.ttf
    font_size50
    font_color#444
    pad_col_headers30
    pad_row_headers50
    wrap_col_headers0
    wrap_row_headers0

    The ComfyLab XY Plot system gives you a grid of images out of the box - and it looks like it. Default grids are functional but ugly: cramped cells, tiny headers, a flat gray background. Plot Config: Grid (lab) is the optional styling node that fixes that. You plug it into the Render node's grid-config slot and suddenly you control the gaps, fonts, colors, padding, and can even make the whole grid transparent for compositing over a background image.

    How it works

    It's a pure configuration node: it emits a plot_config_grid output of the custom PLOT_CONFIG_GRID type, which you wire into XY Plot: Render (lab)'s config: grid input. Nothing else changes - the queue, the sampler, all of it stays untouched. Render reads this config when it assembles the final grid, so it only matters at the end of a run. It's the sibling of Plot Config: Header/Footer (lab), which styles the page headers instead.

    The inputs that matter

    There are nine, and you'll realistically touch about four:

    • gap (default 20) - spacing in pixels between grid cells. This is the single biggest visual upgrade; crank it up and a grid stops feeling like a contact sheet.
    • background_color (default #b9b9b9) - accepts a color name (red) or hex (#aaa, #b9b9b9). The special value transparent renders the grid as RGBA, which is the trick for overlaying it on a custom background image - combine it with the pack's Load Image (RGBA) (lab) node and you get grids that look designed rather than generated.
    • font (default Roboto-Regular.ttf) - one of the four Roboto faces shipped with the pack, or the full path to any TTF on your machine. The four bundled fonts keep you honest; a custom path is there if you want a brand look.
    • font_size (default 50) and font_color (default #444) - the headers' type size and color.

    The rest are refinements: pad_col_headers and pad_row_headers (vertical/horizontal padding around headers), and wrap_col_headers / wrap_row_headers - set one above 0 and header text wraps after that many characters, breaking smartly on hyphens when it can.

    Gotchas

    Colors accept names or hex, and the tooltip on the node spells that out - blue and #0000ff both work. The one that catches people: transparent is the only way to get an RGBA grid, and if you use it you need a background behind it, or you'll save a see-through grid. And remember this node does nothing on its own - no PLOT_CONFIG_GRID consumer, no effect. It only exists inside the Queue → ... → Render flow.

    Install

    It's part of ComfyLab Pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bugltd/ComfyLab-Pack.git
    cd ComfyLab-Pack
    pip install -r requirements.txt
    

    Or ComfyUI Manager → ComfyLab Pack, then restart. No model files to download; the pack's only heavy dependency is opencv-python. If you're new to the XY Plot flow, the pack's own tutorials ("pimp my grid" is the relevant one) walk through exactly how these config nodes slot in.

    CategoryComfyLab/plot

    Inputs (9)

    NameTypeDefaultDescription
    gapINT20gap between grid cells
    background_colorSTRING#b9b9b9background color, can be either a color name ('red'), or the RGB hex notation ('#b9b9b9', '#aaa') use the special value 'transparent' to generate a RGBA image
    fontSTRINGRoboto-Regular.ttffont: either one of 'Roboto-Regular.ttf' / 'Roboto-Bold.ttf' / 'Roboto-Italic.ttf' / 'Roboto-BoldItalic.ttf', or the full path to a locally-installed TTF font
    font_sizeINT50font size
    font_colorSTRING#444font color, can be either a color name ('red'), or the RGB hex notation ('#b9b9b9', '#aaa')
    pad_col_headersINT30vertical padding to apply to column headers
    pad_row_headersINT50horizontal padding to apply to row headers
    wrap_col_headersINT0if > 0, max number of characters in column headers before wrapping
    wrap_row_headersINT0if > 0, max number of characters in row headers before wrapping

    Outputs (1)

    NameTypeDescription
    plot_config_gridPLOT_CONFIG_GRIDplot configuration for the grid