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

Plot Config: Header/Footer (lab)

Page headers and footers for XY plots that span multiple pages

By bugltd·Created 2 years ago·Updated about a year ago· 11
Plot Config: Header/Footer (lab)
    • plot_config_hf
    text_left
    text_center
    text_right
    background_colortransparent
    fontRoboto-Bold.ttf
    font_size60
    font_color#222
    padding30

    Most XY plots fit on one grid, and then some don't - you've varied enough combinations that the result paginates, and now each page needs context so you can tell what you're looking at. Plot Config: Header/Footer (lab) is the ComfyLab node for that job: it styles a page header or footer, with text that can show the current page number. It's the companion to Plot Config: Grid (lab), and it's what makes multi-page plots legible instead of a mystery stack of grids.

    How it works

    It emits a plot_config_hf output of the custom PLOT_CONFIG_HF type, and you wire it into XY Plot: Render (lab)'s plot_config_header or plot_config_footer input - the same node feeds either slot, so you'd use two instances if you want both. Render reads it when assembling each page. Like its sibling, it's a pure config node: no effect until it's plugged into a Render.

    The inputs that matter

    • text_left, text_center, text_right - the three text regions. This is where the pagination magic lives: each accepts the placeholders {current_page} and {total_pages}, so Page {current_page}/{total_pages} in text_center gives you a running page count.
    • background_color (default transparent) - the header/footer's own background. transparent means "use the grid background," which is the sane default; set a hex or color name if you want a distinct band.
    • font (default Roboto-Bold.ttf) - one of the four bundled Roboto faces or a full path to any TTF on disk.
    • font_size (default 60) and font_color (default #222) - the text styling.
    • padding (default 30) - vertical breathing room above and below the text.

    That's the full set: three text fields, one background, three type controls, one pad.

    Gotchas

    The {current_page} / {total_pages} placeholders only work in this node's text fields. Don't confuse them with the {dim1} / {dim2} templating on the Render node's header-format widgets - different placeholders, different jobs (dim values vs. page numbers). Also, the page counter is only interesting if you've actually enabled pagination on the Queue node's dim1: max per page / dim2: max per page widgets; with pagination off, {current_page} is always 1. Not a bug, just physics.

    Install

    Standard pack install:

    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 ComfyUI. No model downloads; opencv-python is the pack's only heavyweight dependency. If headers feel like overkill for a single-page grid, skip it - the node earns its place the moment you're printing multi-page LoRA or checkpoint comparisons.

    CategoryComfyLab/plot

    Inputs (8)

    NameTypeDefaultDescription
    text_leftSTRINGtext to be displayed on the left of the page header or footer the following placeholders are accepted: {current_page}, {total_pages}
    text_centerSTRINGtext to be displayed at the center of the page header or footer the following placeholders are accepted: {current_page}, {total_pages}
    text_rightSTRINGtext to be displayed on the right of the page header or footer the following placeholders are accepted: {current_page}, {total_pages}
    background_colorSTRINGtransparentbackground color for the page header or footer, can be either a color name ('red'), or the RGB hex notation ('#b9b9b9', '#aaa') use the special value 'transparent' to keep the grid background
    fontSTRINGRoboto-Bold.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_sizeINT60font size
    font_colorSTRING#222font color, can be either a color name ('red'), or the RGB hex notation ('#b9b9b9', '#aaa')
    paddingINT30padding inside the page header or footer

    Outputs (1)

    NameTypeDescription
    plot_config_hfPLOT_CONFIG_HFplot configuration for either the page header or footer