ComfyUI > Nodes > ComfyUI > Concatenate

ComfyUI Node: Concatenate

Class Name

StringConcatenate

Category
utils/string
Author
ComfyAnonymous (Account age: 872days)
Extension
ComfyUI
Latest Updated
2025-05-13
Github Stars
76.71K

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

Concatenate Description

Efficiently combine two strings into one output with StringConcatenate node for AI artists manipulating text data.

Concatenate:

The StringConcatenate node is designed to seamlessly combine two strings into a single, unified string. This node is particularly useful when you need to merge text data, whether for creating longer narratives, combining user inputs, or assembling dynamic content. By leveraging this node, you can efficiently handle string operations without delving into complex coding, making it an essential tool for AI artists who want to manipulate text data effortlessly. The primary function of this node is to take two separate strings and concatenate them, resulting in a single string output that reflects the combined content of the inputs.

Concatenate Input Parameters:

string_a

string_a is the first string input that you want to concatenate. This parameter allows for multiline text, meaning you can input a string that spans multiple lines if needed. The content of string_a will be placed at the beginning of the resulting concatenated string. There are no specific minimum or maximum values for this parameter, as it is designed to handle any string input provided.

string_b

string_b is the second string input that you want to concatenate with string_a. Like string_a, this parameter also supports multiline text, allowing for flexibility in the type of content you can input. The content of string_b will follow string_a in the resulting concatenated string. There are no specific constraints on the length or content of string_b, making it adaptable to various use cases.

Concatenate Output Parameters:

IO.STRING

The output of the StringConcatenate node is a single string that represents the concatenation of string_a and string_b. This output is crucial for scenarios where you need a unified text result from two separate inputs. The concatenated string maintains the order of the inputs, with string_a appearing first, followed by string_b. This output can be used in further text processing or as a final result in your AI art projects.

Concatenate Usage Tips:

  • Use StringConcatenate to merge user-generated content with predefined text templates, allowing for dynamic and personalized outputs.
  • When working with multiline text, ensure that both string_a and string_b are formatted correctly to avoid unexpected results in the concatenated output.

Concatenate Common Errors and Solutions:

Empty String Output

  • Explanation: If both string_a and string_b are empty, the output will also be an empty string.
  • Solution: Ensure that at least one of the input strings contains the desired content to avoid an empty output.

Unexpected Concatenation Result

  • Explanation: If the concatenated result does not match expectations, it may be due to unintended whitespace or newline characters in the input strings.
  • Solution: Check and trim any unnecessary whitespace or newline characters in string_a and string_b to achieve the desired output format.

Concatenate 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 Playground, enabling artists to harness the latest AI tools to create incredible art.