Nodes/AI4ArtsEd Nodes/AI4ArtsEd Text Remix
ComfyUI Node

AI4ArtsEd Text Remix

A 12-way text combiner with a random mode

By joeriben·Created about a year ago·Updated 7 months ago· 1
AI4ArtsEd Text Remix
    • text
    moderandom
    text_1
    text_2
    text_3
    text_4
    text_5
    text_6
    text_7
    text_8
    text_9
    text_10
    text_11
    text_12

    AI4ArtsEd Text Remix is the pack's plumbing node: a simple STRING combiner with a genuinely useful trick. It takes up to twelve text inputs, and depending on the mode you set, it either joins them all, picks one at random, or hands back a specific slot. That's it. No LLM, no network, no key. The whole thing is a few dozen lines of Python.

    So why would you bother? Because the rest of this pack generates variety - four different artform instructions, twelve languages, random prompt rewrites - and eventually you need to turn several of those strings into one. This node is where they meet. And the random mode is the part you'll actually reach for, because it turns a pile of alternative prompts into a rolling lottery without you touching the graph.

    The inputs that matter

    • mode - a string that's "random", "all", or a number "1" to "12". In random mode it picks one of the non-empty inputs uniformly at random. In all mode it joins the non-empty ones with newlines. In numeric mode it returns exactly that slot (empty if the slot is empty).
    • text_1 through text_12 - all optional, all plain multiline STRINGs. Leave the ones you're not using empty.

    Output is a single STRING called text. Wire it into a CLIP encode, a text display node, or another text node downstream.

    How it fits a workflow

    The pattern the pack's docs imply: feed it the outputs of ai4artsed_random_instruction_generator or ai4artsed_random_artform_generator, set mode to random, and every run picks a different transformation instruction for your prompt. Combined with the IS_CHANGED-style re-execution on the other nodes, you get a new instruction each queue pass.

    One thing to watch: the random pick happens every time ComfyUI executes the node, but ComfyUI only re-executes when an input changes. If nothing feeding text_remix changes between runs, the random draw doesn't re-fire. That's actually the intended behavior here - the upstream randomizers in this pack force their own re-execution, which in turn re-runs this node. If you're feeding it from static text, bump a seed or reconnect a wire to get a fresh pick.

    Installing it

    Same as every node in this pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/joeriben/ai4artsed_comfyui_nodes
    # restart ComfyUI
    

    Or search "AI4ArtsEd" in ComfyUI Manager. No extra dependencies beyond what ComfyUI already ships.

    Common issues

    Nothing comes out of a numeric mode. Check the slot. If you set mode to "5" but text_5 is empty, you get an empty string - it doesn't fall through to a random pick.

    "Random doesn't change anything." That's ComfyUI's caching, not a bug. The node only re-rolls when an input changes. For a re-roll on demand, feed it from one of the pack's seeded randomizers or change any input value.

    It's boring, it's small, and it does exactly one job. Which, for a pack this experimental, is a relief.

    CategoryAI4ArtsEd

    Inputs (13)

    NameTypeDefaultDescription
    modeSTRINGrandom
    text_1optSTRING
    text_2optSTRING
    text_3optSTRING
    text_4optSTRING
    text_5optSTRING
    text_6optSTRING
    text_7optSTRING
    text_8optSTRING
    text_9optSTRING
    text_10optSTRING
    text_11optSTRING
    text_12optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING