LoRA Txt Loader (From Path)
The LoRA loader that reads the .txt itself, for path-driven workflows
- model
- clip
- model
- clip
- positive_prompt
- lora_path
LoRA Txt Loader (From Path) is the variant of this pack for people who don't want a dropdown at all. Instead of picking a LoRA from a list, you hand the node an absolute file path string, and it loads the model and reads the trigger-word .txt itself. No browser, no frontend auto-fill - the file reading happens in Python at execution time.
That makes it the right node for dynamic workflows. If another node computes or passes along a LoRA path, or you're driving ComfyUI from its API where no one is around to click a tree, the path input is what you want. It's the only member of the family that's fully self-contained on the trigger-word side: you don't have to wire up a separate text-loader to get words into the graph.
How it works
The inputs are the giveaway. There's no positive_prompt box here - just:
model/clip- from your checkpoint loader.lora_path- the full path to a.safetensors(or.ckpt) file.strength_model/strength_clip- standard strengths, default 1.0.
The node checks the file exists, loads it, and applies it via comfy.sd.load_lora_for_models, same as the native Load LoRA. Then it looks for a .txt with the same base name next to the model - models/loras/my_lora.safetensors → models/loras/my_lora.txt - and reads it. That content comes out of the positive_prompt STRING output automatically.
Outputs are model, clip, positive_prompt (the auto-read trigger words), and lora_path (echoed back).
The gotcha that gets people: if the path is wrong or the file is missing, the node raises a FileNotFoundError and the queue dies with it. So keep the path absolute and correct - no relative paths, no tilde shortcuts. And remember the words still only matter if you wire the positive_prompt output into a CLIP Text Encode (or Text Concatenate → text encode). Patching model and clip alone applies the LoRA but leaves the trigger out of your prompt.
Installing it
Same pack, same install - ComfyUI Manager search "LoRA Txt Loader", or:
cd ComfyUI/custom_nodes
git clone https://github.com/kwokkakiu233/comfyui-lora-txt-loader
Restart after. No requirements.txt, no extra Python dependencies.
When to actually use it
If you're building normal interactive workflows and just want trigger words auto-filled in a box, use the pack's main LoRA Txt Loader - the tree browser is nicer for that. Reach for From Path when the LoRA is chosen programmatically: a workflow that iterates a list of paths, a node that outputs a path from some other logic, or API-driven batches where the graph needs to run unattended. It's a niche, but it's the niche this node fills cleanly.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| lora_path | STRING | — | |
| strength_model | FLOAT | 1.00-10–10 | — |
| strength_clip | FLOAT | 1.00-10–10 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| positive_prompt | STRING | — |
| lora_path | STRING | — |