Visit ComfyUI Online for ready-to-use ComfyUI environment
Merge multiple text inputs with specified delimiter, clean up whitespace for neat output.
The Text Concatenate node is designed to merge multiple text inputs into a single cohesive string. This node is particularly useful when you need to combine various pieces of text data, such as prompts, descriptions, or any other textual content, into one unified output. By specifying a delimiter, you can control how the individual text segments are joined together, whether it's with a space, comma, newline, or any other character. Additionally, the node offers an option to clean up whitespace from the inputs, ensuring that the final concatenated text is neat and free from unnecessary spaces. This functionality is essential for creating well-structured and readable text outputs, making it a valuable tool for AI artists who need to manage and manipulate text data efficiently.
The delimiter
parameter specifies the character or string that will be used to separate each text input when they are concatenated. For example, if you set the delimiter to a comma, each piece of text will be joined with a comma in between. Special handling is provided for newline characters, where both \n
and \\n
will be interpreted as actual newlines. This parameter allows you to customize the format of the final output string to suit your needs.
The clean_whitespace
parameter determines whether leading and trailing whitespace should be removed from each text input before concatenation. When set to "true", any extra spaces at the beginning or end of each input will be stripped away, resulting in a cleaner and more polished final output. This is particularly useful when dealing with text inputs that may have inconsistent spacing, ensuring that the concatenated result is tidy and professional.
The kwargs
parameter represents a collection of additional text inputs that will be concatenated. These inputs are processed in sorted order based on their keys. Each input should be a string, and only non-empty strings will be included in the final concatenated output. This flexible parameter allows you to pass multiple text inputs dynamically, making the node adaptable to various use cases.
The merged_text
output parameter is the final concatenated string that results from combining all the provided text inputs using the specified delimiter. This output will always be generated, even if the input texts are empty, ensuring that you have a consistent output to work with. The merged_text
is the primary result of the node's operation, providing a single, unified text string that can be used in subsequent processes or outputs.
clean_whitespace
option to ensure that the final output is free from unnecessary spaces, making it more readable and professional.kwargs
to dynamically concatenate varying numbers of text segments, allowing for flexible and adaptable text processing.kwargs
parameter.clean_whitespace
option is not functioning as expected.clean_whitespace
parameter is set to "true" and that the text inputs contain leading or trailing whitespace that can be cleaned.© Copyright 2024 RunComfy. All Rights Reserved.