🧩 Lora Loader (OreX)
Trigger words and previews, without opening Civitai
- model
- clip
- MODEL
- CLIP
- Trigger Words
- Lora Names
Everyone with more than ten LoRAs installed has had the same moment: you know the LoRA exists, you can't remember its trigger words, and now you're alt-tabbing to Civitai mid-workflow. Lora Loader (OreX) is the loader that remembers for you. It's a drop-in replacement for ComfyUI's LoraLoader with two additions - it reads the LoRA's trigger words and shows a preview image right in the node. Small features, but they kill a genuinely annoying workflow interruption.
How it works
On the surface it's the standard LoraLoader: give it a model, a clip, and it applies the LoRA and hands back the patched MODEL and CLIP. The difference is a custom server endpoint the pack registers (/orex/lora_info) that digs through your LoRA's metadata. Trigger words come from a chain of sources, in order of preference: a cached .orex.json file the node itself writes, the .civitai.info sidecar, .metadata.json, .rgthree-info.json, any sibling .json, and finally the safetensors header itself (scanning for trainedWords/trigger_words). Previews are found the same way - the node looks for a .<name>.orex.preview.png image next to the LoRA and, if the metadata points at Civitai images, it grabs those.
If nothing local pans out, the node takes a different approach: it computes your LoRA file's SHA-256 hash and queries Civitai's model-versions/by-hash API to pull the metadata, then caches the result as .orex.json next to the file. So the first load can take a moment (hashing a 100 MB file isn't free), but every load after that is instant and offline.
Outputs that matter
- MODEL and CLIP - the standard patched outputs, wire these where you'd wire any LoraLoader.
- Trigger Words - a STRING with the LoRA's trained words, ready to paste into your prompt. This is the feature.
- Lora Names - the filename of the LoRA as a string, handy for logging or building filenames.
Install
ComfyUI Manager (search "comfyui-OreX") or:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
Restart. The node uses aiohttp for the Civitai lookup - that ships with modern ComfyUI, but if the API call errors on startup check that aiohttp is present. No LoRA files come with the pack; you still download those yourself.
The honest caveats
The Civitai API call is a one-way street - it only enriches your own files, never uploads anything - but it does mean the first load of an uncached LoRA is network-dependent and slow. And the trigger-word extraction is only as good as the metadata the LoRA author bothered to write; a sloppy metadata-less LoRA will still hand you empty strings. If you're the kind of person who keeps a notes file of trigger words anyway, this node replaces that file rather than competes with it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| Trigger Words | STRING | — |
| Lora Names | STRING | — |