KJNodes/textgenerated

Append Strings To List(AppendStringsToList)

In terms of technical implementation, this node internally converts all non-list type string inputs into single-element lists automatically.

Append Strings To List

STRING
string1
STRING
string2
STRING
KJNodes

The Append Strings To List node, in its technical implementation, automatically converts all non-list type string inputs into single-element lists internally.

The Append Strings To List node is a text processing tool whose core function is to concatenate two strings or string lists into a new list. It receives two inputs, whether they are individual strings or string lists, and ultimately merges them to output a unified list.

Node Functionality

In its technical implementation, the node internally converts all non-list type string inputs into single-element lists. Its core mechanism uses Python's list addition operation to sequentially concatenate the two processed lists, thereby generating a new string list containing all input elements. It supports standard string and string list formats.

Node Parameter Description - Append Strings To List

Parameters

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
string1STRINGYes'' (empty string)-Input parameter string1: The first string or string list to be concatenated. No input format restrictions.
string2STRINGYes'' (empty string)-Input parameter string2: The second string or string list to be concatenated. No input format restrictions.

Output

Parameter NameData TypeDescription
STRINGSTRINGOutput parameter STRING: The new string list generated by merging the inputs.

Usage Scenarios

In practical applications, this node is commonly used in workflows that require batch combination of text information. For example, when constructing prompt engineering, users can prepare two separate lists, such as "main description" and "style modifiers," and use this node to merge them, generating a complete prompt list ready for subsequent text generation nodes.

Notes

Please note that the output of this node is always a list. Even if both inputs are individual strings, the output will be a list containing these two strings, rather than a single concatenated long string.

The Append Strings To List node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…