Nodes/ymc-node-suite-comfyui/join text to text preset - adv
ComfyUI Node

join text to text preset - adv

Merge an incoming text stream into every prompt slot — and stamp it

By YMC-GitHub·Created 3 years ago·Updated about a year ago· 20
join text to text preset - adv
    • text
    • a
    • b
    • c
    • d
    • e
    • f
    • g
    text
    a
    b
    c
    d
    e
    f
    g
    action

    The plain join text node glues fixed slots together. Join text to text preset - adv is the version that also takes a wired text input and merges it into every slot - head or tail - then timestamp-processes the lot. If your workflow has a dynamic string (a picked item from get text in list (loop), a filename, a date token) that needs to land on each of your seven prompt fragments, this is the node that does it in one pass.

    The action dropdown is the whole design: none passes the slots through untouched, text-as-head prepends the incoming text to each slot, text-as-tail appends it. So a single node can switch between "my looped pick goes at the front of every prompt" and "every prompt gets the date appended," depending on what you're testing.

    How it works

    The incoming text and the seven slots (ag) are combined per your action choice, then - this is the shared adv trick - every resulting value is run through datetime.datetime.now().strftime(...). That means %Y, %m, %d tokens anywhere in your slots get expanded to the current date/time at execution. The text input is carried through as the first output so the stream survives for downstream use.

    The strftime pass is both the feature and the footgun: useful when you want dated prompt fragments, annoying when your text happens to contain % characters that get eaten.

    Inputs and outputs

    • text - optional STRING (forceInput), the dynamic stream to merge
    • a through g - optional STRING slots
    • action - none | text-as-head | text-as-tail
    • Outputs: text, a, b, c, d, e, f, g - eight STRING wires

    Installing it

    # ComfyUI Manager: search "ymc suite" and install ymc-node-suite-comfyui
    # or:
    cd ComfyUI/custom_nodes
    git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
    

    Restart after installing. Four tiny pure-Python PyPI helpers self-install; no models, no GPU cost.

    Gotchas

    • All inputs here are optional, so you can build a workflow where nothing is connected and get empty strings out - a classic "why is my prompt blank" if you forget to wire text.
    • % tokens get expanded on every output. If your prompt fragments contain literal percent signs, this node will silently rewrite them; use the plain join for %-free gluing.
    • The sibling to know about: join text for plain fixed-slot joining, input text preset - adv for prefixing without the wired stream. This node is the overlap of both.
    • WAS-conflict reminder: if WAS Node Suite is also installed, Manager may flag shared node names between the packs.
    Categoryymc suite/text/plain

    Inputs (9)

    NameTypeDefaultDescription
    textoptSTRING
    aoptSTRING
    boptSTRING
    coptSTRING
    doptSTRING
    eoptSTRING
    foptSTRING
    goptSTRING
    actionoptCOMBO3 options: none, text-as-head, text-as-tail

    Outputs (8)

    NameTypeDescription
    textSTRING
    aSTRING
    bSTRING
    cSTRING
    dSTRING
    eSTRING
    fSTRING
    gSTRING