Nodes/Easy Use Anima/Dynamic Text Hub
ComfyUI Node

Dynamic Text Hub

20 prompt boxes, and a fresh {a|b|c} roll on every queue

By nobinBB·Created 2 months ago·Updated 6 days ago· 3
Dynamic Text Hub
    • text_all
    • text_1
    • text_2
    • text_3
    • text_4
    • text_5
    • text_6
    • text_7
    • text_8
    • text_9
    • text_10
    • text_11
    • text_12
    • text_13
    • text_14
    • text_15
    • text_16
    • text_17
    • text_18
    • text_19
    • text_20
    ◄text_1►
    ◄text_2►
    ◄text_3►
    ◄text_4►
    ◄text_5►
    ◄text_6►
    ◄text_7►
    ◄text_8►
    ◄text_9►
    ◄text_10►
    ◄text_11►
    ◄text_12►
    ◄text_13►
    ◄text_14►
    ◄text_15►
    ◄text_16►
    ◄text_17►
    ◄text_18►
    ◄text_19►
    ◄text_20►
    ◄count1►
    ◄modeline_by_line►
    ◄delimiter, ►
    ◄clean_whitespacefalse►

    Prompt variety in ComfyUI is usually done the dumb way: copy the text-encode node, edit one word, run, repeat. Dynamic Text Hub replaces that with one node that grows and shrinks, feeds several prompt encoders separately, and rerolls a bracket choice each time you hit Queue.

    What it's for

    The core idea is the old A1111 bracket trick - wrap alternatives in curly braces and each run picks one. It's the trick people use to build character reference libraries without training anything: {brown|blonde|black} hair, {raining|windy|snowing} and batch, and you get coverage instead of one image per hand-edit. Most of the community that arrived after 2024 never learned it, and it's genuinely one of the cheapest variety levers you have.

    It lands especially well on Anima, which wants you to look up real Danbooru tags rather than invent phrasing. When your prompt is a stack of specific tags, a bracket group is just "pick one of these three real tags this run" - and you get to keep a single source of truth instead of five near-identical text boxes drifting apart.

    How it works

    The node exposes up to twenty multiline string fields, and an arrow control on the node decides how many are live. Only the active ones are joined into text_all; the rest still have their own output sockets, which is the second half of the design - one hub, many wires.

    Choice groups are resolved per field, on execution. Any {...} containing a | gets one alternative picked at random and substituted, and the same resolved string goes to both text_all and that field's individual output, so nothing downstream disagrees with itself. Braces without a bar are left alone, so ordinary decorative braces survive. The pattern it matches on is a single level of braces, so don't nest groups.

    Under the hood it forces re-execution: the node returns float("nan") from IS_CHANGED, which is the standard ComfyUI idiom for "always run me" - nan != nan, so the cache can never conclude the node is unchanged. That's what makes a reroll happen on every queue.

    The controls you actually set

    • count - 1 to 20, driven by the arrows on the node body. This is the one you touch constantly.
    • mode - line_by_line joins the active fields with newlines; join_with_delimiter joins them with the exact delimiter string (default ", "). In line mode the delimiter field is hidden and ignored, so the node doesn't lie to you about what it's using.
    • clean_whitespace - trims each field and collapses runs of spaces, tabs and newlines to a single space. Worth enabling.
    • text_1 … text_20 - the fields themselves.

    Outputs are text_all plus text_1 … text_20, all STRING. text_all goes to your positive text encoder, or into Negative Wildcard Processor Plus, or into the saver's prompt field. The individual outputs are the reason to use this over the many "combine strings" nodes: field 3 can feed a second CLIPTextEncode (a style block, a character LoRA trigger, a separate negative) while text_all carries the whole thing.

    Install

    ComfyUI Manager → search comfyui-easy-use-anima (display name "Easy Use Anima"), or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nobinBB/comfyui-easy-use-anima
    pip install piexif          # Windows portable: python_embeded\python.exe -m pip install piexif
    

    Restart ComfyUI. This node needs nothing beyond the pack itself - no Anima model, no Easy-Use, no model downloads.

    Things that bite

    The reroll is not seed-controlled. Choices come from Python's random, not from the sampler seed, so you cannot lock a combination you liked - screenshot the prompt or copy the resolved text out before you queue again. That's the price of the always-rerun behavior, and it's the thing to know on day one.

    Empty active fields still join. Unlike the pack's LoRA-scheduling node, which drops blank boxes, this one concatenates every active field - so count=4 with only two filled gives you blank lines (or doubled delimiters) in text_all. Turn on clean_whitespace and it tidies up to something usable.

    Lowering count disconnects the sockets being removed so a workflow can't keep a hidden link, which is the safe behavior, but it means shrinking the node can silently drop wires you wanted. Raise it back and the field content returns - the links don't.

    CategoryEasyUse-Anima/Text

    Inputs (24)

    NameTypeDefaultDescription
    text_1optSTRING—
    text_2optSTRING—
    text_3optSTRING—
    text_4optSTRING—
    text_5optSTRING—
    text_6optSTRING—
    text_7optSTRING—
    text_8optSTRING—
    text_9optSTRING—
    text_10optSTRING—
    text_11optSTRING—
    text_12optSTRING—
    text_13optSTRING—
    text_14optSTRING—
    text_15optSTRING—
    text_16optSTRING—
    text_17optSTRING—
    text_18optSTRING—
    text_19optSTRING—
    text_20optSTRING—
    countoptINT11–20—
    modeoptCOMBOline_by_line2 options: line_by_line, join_with_delimiter
    delimiteroptSTRING, —
    clean_whitespaceoptBOOLEANfalse—

    Outputs (21)

    NameTypeDescription
    text_allSTRING—
    text_1STRING—
    text_2STRING—
    text_3STRING—
    text_4STRING—
    text_5STRING—
    text_6STRING—
    text_7STRING—
    text_8STRING—
    text_9STRING—
    text_10STRING—
    text_11STRING—
    text_12STRING—
    text_13STRING—
    text_14STRING—
    text_15STRING—
    text_16STRING—
    text_17STRING—
    text_18STRING—
    text_19STRING—
    text_20STRING—