KJNodes/constantsgenerated

String Constant(StringConstant)

This node technically receives an input of type STRING and passes it unchanged to the output port.

String Constant

STRING
string
STRING
KJNodes

The String Constant node technically receives a string-type input and passes it unchanged to the output port.

The String Constant node is a constant node used to generate and output a fixed text string. Its core function is to provide a static text value for use by other nodes in the workflow, serving as a foundational tool for building dynamic text or controlling processes.

Node Functionality

This node technically receives a string-type input and passes it unchanged to the output port. It supports text input of any length. Internally implemented as a simple pass-through function, it performs no format conversion or processing, ensuring the integrity of the text data.

Node Parameter Description - String Constant

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
stringSTRINGYes""-Parameter description 1 (Input parameter: Defines the text content to be output. Accepts strings of any length with no format restrictions.)

Output

Parameter NameData TypeDescription
STRINGSTRINGParameter description 2 (Output parameter: Outputs the input string unchanged.)

Usage Scenarios

In practical applications, this node is commonly used to provide fixed prompts or tags for text generation nodes (such as CLIP Text Encode). For example, in an image generation workflow, its output string can be connected to a text encoder to define the subject or style of the image.

Notes

Since this node only outputs the raw input string without any logical processing, it cannot dynamically change the text content based on conditions. If text generation based on the output of other nodes is required, other logic nodes need to be used in conjunction.

The String Constant node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…