Lumi Wrap Text
Slam a prefix and suffix onto any prompt without retyping it
- text
Lumi Wrap Text does one thing: it takes a string, glues a prepend onto the front, an append onto the back, and outputs the result. prepend + text + append, full stop. It sounds almost insultingly simple, but it's the kind of node that quietly solves a problem you hit weekly: adding a fixed style block or quality boilerplate to a prompt you don't want to edit by hand.
The classic use case is the quality-tag sandwich. You have a prompt that changes every run - a wildcard resolution, a shuffled prompt, an LLM rewrite - and you want it wrapped in a stable frame like masterpiece, best quality, <dynamic content>, highly detailed. Instead of editing the dynamic source, you wire the dynamic text into text, set the prepend and append once, and the wrapper follows whatever the upstream node produces. Same idea applies when you're feeding an LLM: wrap a generated description with "rewrite this as a detailed image prompt" boilerplate without touching the generator.
The inputs that matter
- text - the input to wrap (force-input, so it must come from another node's string output - a text box, a wildcard, an LLM).
- prepend - text added before the input (multiline).
- append - text added after the input (multiline).
Output: text, the full concatenation as a single STRING. Chain it with other text nodes freely - it's just string math.
One small implementation detail worth knowing: if an upstream node hands it a None (a failed or empty output), it raises a clear error instead of silently producing garbage - which makes it a surprisingly useful canary for "your upstream text node broke." The widget defaults are empty strings, so it's a no-op pass-through until you type something.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/illuminatianon/comfyui-lumi-tools
cd comfyui-lumi-tools
uv sync
Restart ComfyUI, or search "Lumi Tools" in ComfyUI Manager.
The gotchas
A couple of honest warnings. First, comma hygiene is on you: if you prepend masterpiece, you need to include the trailing comma and space, or you'll get masterpiece,a red car - syntactically fine, semantically sloppy. Second, remember the model-family caveat from modern prompting: quality-tag boilerplate is largely inert on LLM-encoded models, so if you're wrapping for those, the frame should be an instruction ("describe the following scene") rather than a stack of masterpiece tags. And finally, if your upstream text is huge, the wrap is cheap - this node doesn't care about length, so use it freely as glue between text stages.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Input text to wrap | |
| prepend | STRING | Text to add before the input | |
| append | STRING | Text to add after the input |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |