PJ Lora Loader (Custom Path)
PJ Lora Loader (Custom Path) with a live dropdown
- model
- clip
- MODEL
- CLIP
ComfyUI's built-in LoraLoader only sees one folder: ComfyUI/models/loras. That's fine until your LoRA collection lives somewhere else - a shared drive, an A1111 install, a second SSD with 200 GB of .safetensors you're not about to copy. PJ Lora Loader (Custom Path) is for that person. Give it an absolute path, and it scans that folder - recursively - for .safetensors, .ckpt, and .pt files and gives you a dropdown to pick from. And the dropdown updates live when you change the path.
The mechanism is a nice bit of glue: the node exposes a small HTTP endpoint (/pj/list_loras) that walks the folder, and a bundled JavaScript widget calls it whenever you edit lora_directory, repopulating the lora_name choices without a reload - keeping your currently-selected value if it still exists in the list. Change the path, the list refills. That's the whole point of the node, and it works.
The important part: it's a real LoRA loader
Custom path is the gimmick; the loading is the substance, and it's not a gimmick. Under the hood it calls comfy.sd.load_lora_for_models - the exact same function ComfyUI's native loader uses - so the results are byte-for-byte the same as the built-in node. You're not getting a weaker "compat mode" LoRA application. It also caches the loaded weights per node instance, so re-running a batch doesn't re-read the file off disk every time.
One genuine difference from the native loader: clip is optional here. The built-in LoraLoader insists on a CLIP input; this one lets you leave it unplugged and still apply model-side LoRA strength, which is handy for architectures where you're not running a text encoder the usual way. Plug it in when you have it.
Inputs and outputs
model- your checkpoint/diffusion model (required).lora_directory- the absolute path to scan, e.g.D:\SD_Webui\models\Lora. Backslashes on Windows are fine.lora_name- dropdown, filled from the scan; subfolder paths are shown relative to the directory.strength_model/strength_clip- default 1.0, range −100 to 100. Same semantics as the native node:strength_modelbakes the LoRA into the denoiser,strength_clipinto the text-encoder side. 0.5–1.0 is the normal dial range; negative values invert. Set both to 0 and the node is a passthrough.clip- optional, wire it in when your model has a text encoder.
Outputs: MODEL and CLIP, ready for the KSampler - the standard LoraLoader contract.
Installing it
Same pack, same drill - ComfyUI Manager search PJLatent, or:
cd ComfyUI/custom_nodes/
git clone https://github.com/pongjoo/ComfyUI-PJLatent.git
Restart, then find it under Add Node → PJ_Nodes → Model. No extra Python packages; the only moving parts are the JS widget and the API route it calls.
Where people get burned
If lora_directory doesn't exist or is unreachable, the dropdown empties out and you get nothing - there's no fallback to your normal loras folder. This node is strictly for outside paths; for anything in models/loras, just use the built-in loader and skip the extra hop. One thing to know: lora_name here is a plain string widget, not the fancy folder_paths widget ComfyUI uses on its native node, so it won't auto-fill from your standard loras directory. Point it at your custom folder and forget it. A recent commit also added input validation so a bad path gives you a clean error message instead of ComfyUI's cryptic "Value not in list" - a small fix, but it's the difference between a usable node and a rage-quit.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_directory | STRING | 输入你存放LoRA模型的文件夹路径,例如: E:\models\loras | — |
| lora_name | COMBO | 1 options: | |
| strength_model | FLOAT | 1.00-100–100 | — |
| strength_clip | FLOAT | 1.00-100–100 | — |
| clipopt | CLIP | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |