Kai Civitai LoRA Loader
Stop tabbing out to Civitai for the trigger words
- model
- clip
- model
- clip
- trigger_words
- civitai_json
The most common reason a LoRA "doesn't work" isn't the weight, the base model, or your sampler. It's that the trigger word never made it into the prompt. Kai Civitai LoRA Loader is a drop-in replacement for ComfyUI's built-in LoraLoader that attacks exactly that problem: it pulls the LoRA's trigger words straight off its Civitai page, shows the preview images right on the node, and hands you the words as a string output you can wire into your prompt.
The name is a little misleading - it's not a separate Civitai-only loader, and it calls no API of its own. Mechanically it is the stock LoraLoader with a metadata side-hustle. It subclasses ComfyUI's LoraLoader, so strength_model and strength_clip behave exactly as you expect (both default to 1.0, and going near the -100 floor doesn't do anything useful - keep it in the 0.5–1.0 range).
The interesting part is how the metadata gets in. No API key, no page scraping. Click the Fetch Civitai Info button on the node and ComfyUI's backend SHA256-hashes the LoRA file, then asks Civitai's public model-versions/by-hash endpoint. That endpoint returns the model version that matches your file byte-for-byte, including its trainedWords. The result is cached locally with a 7-day TTL, and concurrent requests for the same LoRA are deduplicated so you don't hammer the API.
Hash-based lookup has a nice consequence and a brutal one. Nice: renaming the file doesn't break it. Brutal: the file has to be byte-identical to the one on Civitai. Re-download it, re-save it from a picker, convert it - the hash won't match, you get a 404, and no trigger words.
The inputs are model and clip from your checkpoint, lora_name from the dropdown, and the two strengths. Outputs: the modified model and clip (wire those into your sampler exactly like a normal LoRA), plus trigger_words (a comma-joined string) and civitai_json (the full metadata as a JSON string, if you want to feed the description or base model somewhere clever). The previews paginate - click the left or right edge - and NSFW previews load blurred until you click them.
Three gotchas bite people, in order:
- It does not auto-fetch. The node never calls Civitai when you hit Queue. Until you click the button once,
trigger_wordsandcivitai_jsoncome out empty. Click it and the button becomes "Refresh." - The trigger words can legitimately be empty. The endpoint returns whatever the creator filled in under trained words, and plenty of LoRAs have none. Not a bug - the data just isn't there.
- If you're behind a proxy, tell it. The pack ships a
config.json.examplepointing athttp://127.0.0.1:7890- the author's own setup. If fetches time out (default timeout is 30 seconds), add aconfig.jsonwith your proxy undercivitai.proxy, or just setHTTPS_PROXY.
Install is the standard two-liner, and the only Python dependency is aiohttp - which ComfyUI already installs for its own server, so nine times out of ten there's nothing extra to do:
cd ComfyUI/custom_nodes
git clone https://github.com/kenyonxu/ComfyUI_KaiUtilities.git
cd ComfyUI_KaiUtilities
pip install aiohttp
Restart ComfyUI and the node appears under KaiUtilities/loaders. ComfyUI Manager finds it if you search "Kai Civitai LoRA Loader."
Is it essential? Not quite - rgthree's Power LoRA Loader also surfaces trigger words via a right-click info dialog, and the built-in loader works fine when you already know your words. Where this one wins is the two string outputs. Once trigger words are an output, you can pipe them into a prompt template or a text writer, and the full JSON makes automation genuinely easy. It's a small pack from a single author with a tiny community footprint, so don't expect a big support base - but for the one thing it does, never tabbing out mid-workflow to check a trigger word, it's hard to beat.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_name | COMBO | 0 options: | |
| strength_model | FLOAT | 1.00-100–100 | — |
| strength_clip | FLOAT | 1.00-100–100 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | The modified diffusion model. |
| clip | CLIP | The modified CLIP model. |
| trigger_words | STRING | — |
| civitai_json | STRING | — |