Nodes/ComfyUI/Add Text Prefix (DEPRECATED)
ComfyUI Node Runs on cloud

Add Text Prefix (DEPRECATED)

A deprecated node you can safely skip

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,937
Add Text Prefix (DEPRECATED)
    • texts
    texts
    prefix

    Here's the whole honest review: Add Text Prefix (AddTextPrefix) takes a string, prepends a prefix to it, and outputs the result. And the node itself tells you it's deprecated - the "(DEPRECATED)" in its own display name. You almost certainly don't need it, but if you've opened this page because a downloaded workflow uses it, here's what's going on and what to do instead.

    This node is a leftover from ComfyUI's dataset/batch tooling (it lives in the same source file as the dataset processing nodes), where "add a prefix to all texts" made sense when processing lists of captions for training. It got absorbed into the newer, cleaner string-utility family - and the "superseded by Concatenate Text" note in the source says exactly where the team wants you.

    How it works

    Mechanically it's one line: prefix + text. Your texts input (the "Text to process") gets the prefix ("Prefix to add") glued onto the front, no delimiter, no separator magic. If your prefix is "masterpiece, " you get "masterpiece, <your text>" - the comma and space are your job, just like in Concatenate Text. The output is the combined string, labeled texts ("Processed texts").

    That's the entire interface: two inputs, one output. There are no flags, no trim options, no smart handling of whitespace. Simple to a fault. One quirk of its lineage worth knowing: it was built for batch caption processing, so the interface labels everything in the plural ("texts," "Processed texts") even though the socket carries a single string - a telltale sign you're holding a node repurposed from dataset tooling.

    What to use instead

    The replacement is the sibling core node Concatenate Text (StringConcatenate), which does the same prefix-joining plus the all-important delimiter input. Swap prefix = "masterpiece, " for string_a = "masterpiece", delimiter = ", ", string_b = <your text>, and you've got the identical result with the delimiter made explicit. For anything fancier - a prefix built from multiple parts, a template with placeholders - Format Text (StringFormat) is the step up.

    Common issues

    If a workflow loads with this node and it errors or misbehaves, the first thing to check is your ComfyUI version - deprecated nodes still exist so old graphs load, but they're not where maintenance effort goes. The practical upgrade path is one swap: Add Text Prefix out, Concatenate Text in. And if you're starting a new workflow, skip it entirely - a node that's deprecated on arrival isn't a building block, it's a legacy feature, and the modern equivalents are strictly more capable. There's no secret power here, just history.

    Categorytext

    Inputs (2)

    NameTypeDefaultDescription
    textsSTRINGText to process.
    prefixSTRINGPrefix to add.

    Outputs (1)

    NameTypeDescription
    textsSTRINGProcessed texts