Prompt Template
Swap {TRIGGER} without retyping your prompt
- prompt
LoRA workflows have one annoying property: the trigger token sits inside the prompt text, and it changes every time you switch LoRA. Retagging a prompt by hand once per LoRA is how you end up with a filename that says ch9ractername and an image that was generated with a different one.
Prompt Template takes that token out of the text and makes it a wire.
What it does
It does an exact substring replacement, and nothing else:
{TRIGGER} woman, photorealistic close-up, 85mm lens
with trigger = ch9ractername becomes:
ch9ractername woman, photorealistic close-up, 85mm lens
Every occurrence is replaced, not just the first. The match is a literal substring, so it's case-sensitive and whitespace-sensitive - {trigger} in lowercase won't match the default.
If the placeholder isn't present in the prompt, you get the original prompt back unchanged. That's a quiet failure mode worth knowing: no error, no warning, and if you're not looking for it the workflow runs fine with an unsubstituted trigger word in your prompt.
Inputs and outputs
prompt(STRING, required, multiline) - the template. Default is{TRIGGER} woman, photorealistic close-up.trigger(STRING, required) - what replaces the placeholder.placeholder(STRING, optional, default{TRIGGER}) - the exact substring to look for. The author's tooltip says it plainly: "Exact substring to replace."- prompt (STRING) - the result.
That placeholder field is the underrated one. Change it to [name], __SUBJECT__, or %%STYLE%% and you can have several templates in one graph without collisions - useful if you're substituting a style token and an identity token in the same workflow.
Wiring it up
The intended shape is: Trigger Word node (or a literal, or the LORA_BASENAME output from this pack's LoRA Loader + Name) into trigger, and the result into your CLIP Text Encode.
The reason to use a node for the trigger rather than typing it into the template is consistency. If the same string feeds the prompt, the output filename and the run summary, changing LoRA is one edit rather than a hunt through the graph for hardcoded tokens. And a rare alphanumeric trigger token - ch9ractername, styl3name, ohwx - is still the right way to pick one, because a trigger that's a real word fights the base model over a token it already has opinions about.
Install
Manager → search Orel's Nodes → Install → restart → hard-refresh the browser.
cd ComfyUI/custom_nodes
git clone https://github.com/DarkOrel/Orels-Nodes.git orels-nodes
python -m pip install -r orels-nodes/requirements.txt
Restart and hard-refresh. The text nodes need nothing from that requirements file; it exists for the pack's Hugging Face download features. Core utility nodes still load when optional packages are missing.
Gotchas
Empty trigger leaves a mess. With trigger empty, {TRIGGER} woman, ... becomes woman, ... - a leading space and a comma-first prompt. Harmless on most models, ugly in metadata, and confusing when you're trying to work out why a filename line starts with a separator. Default the trigger node to an actual token.
No looping, no lists. One prompt in, one prompt out. If you want to iterate a batch over five trigger words, that's a different node.
It's text, so it's early in the graph. Prompt text goes into the CLIP encode, and on modern architectures that's a language model, not CLIP - which changes what your prompt does but not how this node behaves. Worth knowing when your substituted wording underperforms: on LLM-encoded models the encoder is reading your prompt as an instruction, so the phrasing around your trigger matters more than tag-stacking habits suggest.
Don't use it as a template engine. It replaces one literal token. If you need several placeholders with different values, that's Format Text, which is also in this pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | {TRIGGER} woman, photorealistic close-up | — |
| trigger | STRING | — | |
| placeholderopt | STRING | {TRIGGER} | Exact substring to replace. Default {TRIGGER}. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |