Nodes/ComfyUI-Lora-Manager/Prompt (LoraManager)
ComfyUI Node

Prompt (LoraManager)

A CLIP encoder that folds in trigger words and wildcards

By willmiao·Created 2 years ago·Updated 17 days ago· 1,301
Prompt (LoraManager)
  • text
  • clip
  • CONDITIONING
  • PROMPT
seed
trigger_words1

This is the node that closes the loop. The pack's loaders hand you a LoRA's trigger words on a wire; Prompt (LoraManager) is where those words actually get merged into your prompt and encoded. It's a CLIP text encode - the same fundamental job as the stock CLIP Text Encode node - with two extras bolted on that make it worth swapping in: automatic trigger-word injection, and wildcard expansion with autocomplete.

If you've been manually copying trigger words into your positive prompt every time you change a LoRA, this deletes that chore. Wire the loader's trigger_words into this node, and the words are appended to whatever you typed before the whole thing gets encoded. Change the LoRA, the words change with it, no editing.

How it works

You type your prompt into the text box (with / autocomplete for tags, styles and wildcards), optionally feed in trigger words from a loader, and hand it a CLIP. At runtime it expands any wildcards, appends the trigger words, encodes the final text against CLIP, and outputs both the CONDITIONING for your sampler and the fully-resolved PROMPT string so you can see exactly what got encoded. The seed input drives the wildcard randomization - same seed, same wildcard picks, which is what makes runs reproducible.

Wildcards live in {settings folder}/wildcards/ as .txt, .yaml, .yml or .json files. A wildcards/color.txt becomes __color__ in your prompt; nested YAML keys become paths like __palette/warm__. Type / and the dropdown shows what's available.

Inputs and outputs that matter

  • text (autocomplete prompt box, required) - your prompt.
  • clip (CLIP, required) - from your checkpoint or loader.
  • seed (INT, optional) - fixes wildcard randomization for reproducibility.
  • trigger_words1 (STRING, optional) - trigger words from a loader/stacker; the node merges them in. (More trigger-word inputs appear as you connect them.)

Outputs: CONDITIONING (into your KSampler) and PROMPT (STRING - the final expanded text, great for the Save Image node's metadata or just for debugging).

How to install it

Via ComfyUI Manager: search lora-manager, Install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/willmiao/ComfyUI-Lora-Manager.git
cd ComfyUI-Lora-Manager
pip install -r requirements.txt

then restart. Light Python deps, no models.

Common issues & troubleshooting

Wildcards aren't expanding. They only resolve if the file exists in the wildcards folder. Type / in the box - if the folder is empty, the autocomplete tells you the exact path to drop files into. Names are case- and path-sensitive: __palette/warm__ needs palette and a warm key.

Trigger words didn't get added. Check the trigger_words1 input is actually connected to a loader that produced words, and that the loader had metadata to give.

Output looks the same every run despite a wildcard. You probably left seed fixed. Wildcard variety needs the seed to change - randomize it if you want different picks each generation.

CategoryLora Manager/conditioning

Inputs (4)

NameTypeDefaultDescription
textAUTOCOMPLETE_TEXT_PROMPT,STRINGThe text to be encoded. Wildcard references inserted with /wildcard are expanded at runtime.
clipCLIPThe CLIP model used for encoding the text.
seedoptINTOptional seed for wildcard generation. Leave unconnected for non-deterministic wildcard expansion.
trigger_words1optSTRINGTrigger words to prepend. Connect to add more inputs.

Outputs (2)

NameTypeDescription
CONDITIONINGCONDITIONINGA conditioning containing the embedded text used to guide the diffusion model.
PROMPTSTRING