ComfyUI > Nodes > ComfyUI-Addoor > Text Append/Prepend

ComfyUI Node: Text Append/Prepend

Class Name

TextAppendNode

Category
🌻 Addoor/text
Author
ADDOOR (Account age: 2884days)
Extension
ComfyUI-Addoor
Latest Updated
2025-01-24
Github Stars
0.03K

How to Install ComfyUI-Addoor

Install this extension via the ComfyUI Manager by searching for ComfyUI-Addoor
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Addoor 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

Text Append/Prepend Description

Versatile text manipulation tool for appending/prepending content, crucial for dynamic text modifications.

Text Append/Prepend:

The TextAppendNode is a versatile tool designed to manipulate text by either appending or prepending new content to existing text. This node is particularly useful for AI artists and content creators who need to dynamically modify text data, such as generating variations of text prompts or combining different text elements. By offering the ability to choose between appending and prepending modes, the node provides flexibility in how text is structured and presented. This functionality can be crucial in scenarios where the order of text elements impacts the meaning or effectiveness of the content. The node processes each line of the input texts individually, ensuring that the resulting text is neatly formatted and free of unnecessary whitespace.

Text Append/Prepend Input Parameters:

current_text

The current_text parameter is a multiline string input that represents the existing text to which new content will be added. This parameter is crucial as it serves as the base text that will be modified by either appending or prepending new lines. The text is processed line by line, and any leading or trailing whitespace is removed to ensure clean formatting. There are no specific minimum or maximum values for this parameter, but it should be a valid string input.

new_text

The new_text parameter is also a multiline string input that contains the text to be added to the current_text. This parameter is essential for introducing new content into the existing text structure. Like current_text, it is processed line by line, with whitespace stripped from each line. This ensures that the appended or prepended text integrates seamlessly with the existing content. There are no specific constraints on the length or content of this parameter, but it should be a valid string input.

mode

The mode parameter determines how the new_text is integrated with the current_text. It offers two options: "append" and "prepend". In "append" mode, the new_text is added to the end of each line of the current_text, while in "prepend" mode, it is added to the beginning. This parameter is crucial for controlling the order and structure of the resulting text. The default value is not specified, so users must explicitly choose one of the available options.

Text Append/Prepend Output Parameters:

STRING

The output of the TextAppendNode is a single multiline string that represents the modified text after the append or prepend operation. This output is the result of combining the current_text and new_text according to the specified mode. Each line of the current_text is paired with each line of the new_text, resulting in a comprehensive combination of the two inputs. The output is formatted to ensure that each line is clean and free of unnecessary whitespace, making it ready for further processing or use in text-based applications.

Text Append/Prepend Usage Tips:

  • To ensure clean and readable output, make sure that both current_text and new_text are free of unnecessary whitespace before inputting them into the node.
  • Experiment with both "append" and "prepend" modes to see which best suits your text structuring needs, especially when the order of text elements is important.
  • Use this node to quickly generate multiple variations of text prompts by inputting different new_text values while keeping the current_text constant.

Text Append/Prepend Common Errors and Solutions:

Empty current_text or new_text

  • Explanation: If either current_text or new_text is empty, the node may not produce the expected output.
  • Solution: Ensure that both current_text and new_text contain valid string data before processing.

Invalid mode selection

  • Explanation: If the mode parameter is not set to either "append" or "prepend", the node will not function correctly.
  • Solution: Double-check that the mode parameter is explicitly set to either "append" or "prepend" to ensure proper operation.

Text Append/Prepend Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Addoor
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 Playground, enabling artists to harness the latest AI tools to create incredible art.