Nodes/ComfyUI_StarNodes/⭐ Star Grid Captions Batcher
ComfyUI Node

⭐ Star Grid Captions Batcher

Sixteen captions, one string, zero fiddly joins

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Grid Captions Batcher
    • Grid Captions Batch
    caption 1

    Grid images are great until you have to caption them. ComfyUI has no native "put text under each tile" concept, and hand-wiring a text-join subgraph for a 16-image grid is exactly the kind of fiddly nonsense that makes people give up on grids altogether. Star Grid Captions Batcher is the StarNodes piece that makes it painless: feed it up to sixteen caption strings, get one assembled batch that plugs straight into the pack's Star Grid Composer.

    It's in ⭐StarNodes/Image And Latent and is the text half of a two-node team - its sibling Star Grid Image Batcher does the same job for images, and both feed the Star Grid Composer that does the actual layout, captions, fonts and colors.

    How it works

    The node takes a dynamic row of optional caption 1, caption 2, … inputs (the schema shows just caption 1 because slots appear as you fill them, but the batcher collects every one it finds, up to sixteen). Leave one empty and it's simply skipped - no phantom blank tiles in your grid. Everything that's populated gets packed into a single output, Grid Captions Batch, a STRING-typed bundle the Grid Composer knows how to render under the corresponding grid tiles.

    That last part matters more than it looks: the batcher and the composer are made for each other. A generic string concatenation gets you the text; this gets you captions positioned under the right tile because the composer reads the batch in order and pairs slot N with tile N.

    Why you'd reach for it

    Any time your workflow produces a set of variations you want to show labeled - prompt variants, LoRA strength sweeps, seed tests, style comparisons. It's the difference between a grid of images you have to explain in your head and a grid you can screenshot and paste into a channel, a reddit post, or a changelog. For the comparison use case especially, labeled tiles are worth more than the images.

    Installing it

    Part of the StarNodes pack - ComfyUI Manager, search Starnodes, install, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
    cd ComfyUI_StarNodes
    pip install -r requirements.txt
    

    Double-click the canvas and search star - it's under ⭐StarNodes/Image And Latent.

    The gotcha

    The caption count and the image count are set in two different nodes, so it's on you to keep them in sync - if your image batcher has 12 slots filled and the caption batcher has 10, the composer will pair the last two tiles with… whatever it finds. Wire both to the same loop or counter if you have one, and build the "check your counts" step into your routine the first few times. Also, captions are plain strings - no rich text, no line breaks from the input field. Keep them short and let the composer's font settings do the presentation work.

    Category⭐StarNodes/Image And Latent

    Inputs (1)

    NameTypeDefaultDescription
    caption 1optSTRING

    Outputs (1)

    NameTypeDescription
    Grid Captions BatchSTRING