Nodes/ComfyUI-BCNodes/Aspect Prompt List
ComfyUI Node

Aspect Prompt List

Prompts Under [WxH] Headers

By 0xBeycan·Created about a month ago·Updated 13 days ago· 2
Aspect Prompt List
    • prompt
    • body_text
    • width
    • height
    ◄prepend_text►
    ◄multiline_text►
    ◄append_text►

    You want twelve prompts out of one graph. Ten of them are portraits your model renders best at 832×1216, two are square. The normal answer is two graphs, or one graph and a lot of editing the latent size between queues. This node is the other answer: you paste the prompts into one text box, tag each group with a [WxH] header line, and it hands the workflow a width and a height for every prompt, in lockstep.

    What it does

    multiline_text is your prompt block. A line like [1024x1536] sets the size for everything under it until the next header. Every other non-blank line is a prompt, and gets the size of the header above it. Blank lines are skipped, so you can space the groups out.

    Four outputs come out of it, all of them lists of the same length, index-aligned:

    • prompt - each line with prepend_text in front and append_text behind. Use it for a shared quality/style prefix you don't want to retype twelve times.
    • body_text - the bare line, no wrapping. Handy when you want the same text going somewhere else (a caption, a log, a filename).
    • width and height - ints, one pair per prompt.

    The trick that makes it useful is the last two. Wire width and height into a latent node's inputs - EmptySD3LatentImage is the obvious one - and the workflow runs once per line, each run at its own size. One sampler chain, twelve prompts, mixed aspect ratios, one queue. In ComfyUI's execution model that's the whole point of a list output: downstream nodes execute per item rather than once for the batch. (This is also why the pack ships a plainer BC_PromptList, which does the same thing with no sizes at all.)

    The syntax, and what it refuses

    [1280x1280]
    first square prompt
    second square prompt
    
    [1024x1536]
    first portrait prompt
    

    That's the whole grammar. What it won't tolerate: a prompt line above the first header, a header with a zero on either side, or a block with no prompt lines at all. All three raise with the line number, which is nicer than silently rendering nothing.

    Install and set up

    Same pack, same steps as the rest of BCNodes. In ComfyUI Manager, search the pack title ComfyUI-BCNodes and install. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/0xBeycan/ComfyUI-BCNodes
    pip install -r ComfyUI-BCNodes/requirements.txt
    

    Restart ComfyUI, then type BCNodes in the node-library search to filter the whole pack. The requirements line is opencv-python, postfx and caption-audit; the last two only back the PostFx and Caption Audit nodes, so a missing one doesn't stop this node from loading. If you still have a folder named ComfyUI-AutoBypass from the pack's old identity, delete it.

    Where people get burned

    The [WxH] header is not free text. It's parsed as width x height, and a typo in the brackets turns that line into a prompt instead of a size header - so you get a wildly weird generation and everything under it still uses the header above. If the results look like the sizes are off by one group, check for a stray unparsed header line.

    Second thing: your size values should be multiples of 8 (16 for SDXL-family VAEs), or you'll get the dimensions silently rounded somewhere downstream and mixed comparisons between runs. The node happily emits 1023.

    Third: a list this long queue-jumps the sampler that many times, so a 12-prompt block is 12 generations of wall time, not one. That's the deal, but budget for it - sweep it once at low step count before you commit.

    And if you want the same seed across the sweep for a fair comparison, set it explicitly. This is a comparison workflow; randomizing per prompt makes it useless.

    CategoryBCNodes/text

    Inputs (3)

    NameTypeDefaultDescription
    prepend_textSTRING—
    multiline_textSTRINGPrompts grouped under [WxH] header lines, one prompt per line; blank lines are skipped. Each prompt gets the width and height of the header above it.
    append_textSTRING—

    Outputs (4)

    NameTypeDescription
    promptSTRING—
    body_textSTRING—
    widthINT—
    heightINT—