ComfyUI > Nodes > ComfyUI > Add Text Prefix

ComfyUI Node: Add Text Prefix

Class Name

AddTextPrefix

Category
dataset/text
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Add Text Prefix Description

Enhance text processing by adding specified prefixes to text strings for standardization and categorization.

Add Text Prefix:

The AddTextPrefix node is designed to enhance text processing by allowing you to prepend a specified prefix to any given text. This node is particularly useful when you need to standardize text inputs by adding consistent identifiers or labels at the beginning of each text string. By automating the addition of prefixes, this node helps streamline workflows that require uniform text formatting, ensuring that all text data adheres to a specific structure. This can be especially beneficial in scenarios where text data needs to be categorized or tagged systematically, making it easier to manage and process large datasets.

Add Text Prefix Input Parameters:

prefix

The prefix parameter allows you to specify the string that will be added to the beginning of each text input. This parameter is crucial for defining the exact prefix you want to prepend, which can be any string of your choice. The impact of this parameter is directly on the output text, as it determines the initial part of the resulting string. There are no minimum or maximum length constraints provided for the prefix, allowing flexibility in its usage. The default value is an empty string, meaning no prefix will be added unless specified.

Add Text Prefix Output Parameters:

text

The output parameter is the modified text with the specified prefix added to the beginning. This output is essential as it reflects the transformation applied by the node, showcasing the text with the newly added prefix. The importance of this output lies in its ability to provide a consistent and standardized format for text data, which can be crucial for further processing or analysis tasks.

Add Text Prefix Usage Tips:

  • To ensure consistency across your dataset, choose a prefix that clearly identifies the category or type of data you are working with.
  • If you are working with multiple datasets, consider using different prefixes for each to easily distinguish between them during analysis.

Add Text Prefix Common Errors and Solutions:

EmptyPrefixError

  • Explanation: This error occurs when the prefix parameter is left empty, resulting in no change to the text.
  • Solution: Ensure that you provide a non-empty string for the prefix parameter to achieve the desired text transformation.

InvalidPrefixTypeError

  • Explanation: This error arises when the prefix provided is not a string, which is required for the node to function correctly.
  • Solution: Verify that the prefix parameter is a valid string. If necessary, convert other data types to a string before using them as a prefix.

Add Text Prefix Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Add Text Prefix