Const String
One line in, the same line out
- STRING
I'll be upfront: this is the simplest node in a pack full of simple nodes. Const String takes one line of text and outputs it. No transformation, no logic. What it buys you isn't cleverness, it's organization.
How it works
A single-line string input, passed straight through as the output. That's the whole mechanism - the only real design choice the author made was keeping it single-line rather than multiline, which is what separates this from its sibling, Const String (multi line).
Inputs and outputs that matter
- string - the only field, a plain single-line text box.
Output is a single STRING, unchanged, ready to wire into a CLIP Text Encode, or into any of this pack's other nodes that take string input (Join String List, Format String, Replace or Insert Tag, and so on).
Why bother with a node this simple
The honest answer: it's a labeling and reuse trick more than a functional one. If you've got a trigger word, a LoRA filename, a short style keyword, or any other single value you reference in more than one place across a busy graph, dropping it into a named Const String node means you change it once and every connected node picks up the new value - instead of hunting down and editing the same text in three or four separate widgets. It also gives that value a visible, labeled home on the canvas, which matters once a workflow gets big enough that "where did this string come from" stops being obvious at a glance.
Installing it
ComfyUI Manager → search ComfyUI-PromptUtilities → install → restart. Or clone directly:
cd ComfyUI/custom_nodes && git clone https://github.com/nkchocoai/ComfyUI-PromptUtilities
It's pure Python with no dependencies and nothing to download - about as low-risk an install as exists in the custom node ecosystem. You'll find it under the PromptUtilities category.
Where people get burned
There's genuinely not much to troubleshoot on a node this small - if it's not outputting what you typed, check that it's actually connected downstream rather than sitting orphaned on the canvas, which is the single most common reason any "just outputs a value" node appears to do nothing. The only real judgment call is whether you need this node at all: for a value you only use once, typing it straight into the widget you're using it in is simpler. Const String earns its place specifically when the same value needs to live in more than one spot.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |