String Literal
One prompt box that feeds the encoder and the metadata
- STRING
String Literal is a multiline text box that outputs whatever you type as a STRING. That's the node. The value it adds is the same one the whole pack is built around: it lets a single piece of text live in one place and travel to two. Type your prompt once, wire the output into your CLIP Text Encode and into the Save Image w/Metadata node's positive (or negative), and the prompt that conditioned the image is exactly the prompt written into the file. No copy-paste, no chance of the metadata quietly describing a different prompt than the one that ran.
How it works
Whatever's in the box comes out the STRING port. Feed it into a CLIP Text Encode node's text input (convert the widget to an input if needed, or drag onto it) so it drives the actual conditioning, and split the same wire into the save node's prompt field. One edit, both stay in sync.
There's a genuinely useful wrinkle here for anyone using wildcards or dynamic prompts. The save node records whatever text reaches it - so if you route the resolved prompt (the final text after wildcards expand) through String Literal into both the encoder and the saver, your metadata captures the real prompt instead of the __wildcard__ template. That's something ComfyUI's native metadata can't manage, and it's exactly what the pack's author built this plumbing for.
The input and output
- string (
STRING, multiline, default empty) - the text. Multiline, so full prompts with line breaks are fine.
The single output is STRING - the text, ready to fan out.
Installing it
Comes with the pack. ComfyUI Manager: search Save Image with Generation Metadata, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/giriss/comfy-image-saver
cd comfy-image-saver
pip install -r requirements.txt
Restart ComfyUI. Nothing to download.
Where people get tripped up
Set expectations correctly: this is a plain text holder. It doesn't do wildcard expansion, prompt weighting parsing, or any styling - it hands over the literal characters you typed. If you want dynamic prompts, that's a separate node whose output you then route through here to capture the result.
It's not only for prompts, either: the save node's filename and path are strings too, so a String Literal is a tidy way to drive a shared naming scheme from one box. The wiring point applies as always - a CLIP Text Encode text field may be a widget, so convert it to an input before connecting. And a small honest note: many people just type directly into CLIP Text Encode and never need a String Literal at all. It earns its place specifically when you want one prompt shared across encoder and metadata, or when you're building a tidy single-source-of-truth graph. If you're not doing either, you're not missing anything by skipping it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |