Lora Loader (Shinsplat)
The LoRA loader that reads trigger words out of the file itself
- model
- clip
- MODEL
- CLIP
- path_out
- prompt_out
- triggers
- meta
The story behind this node is every LoRA collector's. The author accumulated a pile of models, realized he'd never saved the trigger words, and couldn't remember which keyword went with which file - and going back to the source wasn't always possible. So he copied the standard LoRA loader and added code that reads the safetensors header directly and spits out the training metadata. It does not call CivitAI and needs no API key; the keywords come straight from the file on disk. When a community thread asked "can ComfyUI do what A1111 does with LoRA metadata?" the author himself linked this node.
How it works
A safetensors file starts with an 8-byte length field followed by a JSON header - and that header often contains a __metadata__ block from the Kohya trainer, including ss_tag_frequency (every caption tag and how often it appeared during training) and ss_base_model_version. This node parses that block, pulls out the higher-count phrases as triggers, and dumps the entire metadata dict as pretty JSON on meta. Since it reads the file header, it works with zero network access and on files whose public page deleted the keywords - you sometimes get more phrases than the model card ever showed. It only reads Kohya-style headers for now, and metadata-stripped files (a growing trend the README laments) will yield nothing useful.
Beyond metadata there are two genuinely handy features:
pass_through+path_in/path_out- chain the actual file path from one loader to the next, so you can test the same LoRAs against different checkpoints without re-selecting each one.prompt_in/prompt_out- associate a trigger prompt with the LoRA, saved to a.prompt.txtfile sitting next to the LoRA itself. Connectprompt_inwith content and it writes the file; leave it empty and it reads whatever's there, so the same prompt words auto-load every run. Your LoRA file is never altered - this is a sidecar, and if you move the LoRA you should move the.prompt.txtwith it.
And the iterator pair: weight_model / weight_clip accept space-separated floats like 1.0 0.8 0.5 and step through them across reruns, padding the shorter list with the other strength value. The author warns the LoRA gets re-applied per iteration, so expect a short pause between runs - and note it has to pair with the model each time.
The inputs and outputs
lora_name,strength_model,strength_clip- the standard trio.pass_through,path_in,prompt_in,weight_model,weight_clip- the extras above.
Outputs: MODEL, CLIP, path_out, prompt_out, triggers, meta.
How to install it
Included in ComfyUI-Shinsplat:
cd ComfyUI/custom_nodes
git clone https://github.com/Shinsplat/ComfyUI-Shinsplat
or ComfyUI Manager → "ComfyUI-Shinsplat" → restart. No extra deps.
Common issues
- "No triggers were found" - the file's header has no
__metadata__(stripped or never included). Check themetaoutput to see what's actually there; some LoRAs genuinely ship empty. - The weight iterator never advances - it re-runs only while inputs change or a rerun flag is set; changing any weight input restarts the sequence from a clean slate, by design.
prompt_outempty on a fresh install - there's no.prompt.txtyet. Connectprompt_inonce with your trigger text to create it.
Inputs (10)
| 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 | — |
| pass_through | BOOLEAN | false | — |
| path_inopt | STRING | — | |
| prompt_inopt | STRING | — | |
| weight_modelopt | STRING | — | |
| weight_clipopt | STRING | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| path_out | STRING | — |
| prompt_out | STRING | — |
| triggers | STRING | — |
| meta | STRING | — |