LoRA Name
LoraName Does Exactly One Thing
- lora_name
The name is the whole feature. LoraName (class LoraName) is a dropdown of every LoRA in your models/loras folder, and its only output is the name of whichever one you selected, as a string. No loading, no applying, no weights touched. It exists because ComfyUI's type system is stubborn: the LoraLoader gives you a patched MODEL, not a text name, and when you want the name for a filename template, a prompt, or a logging node, you used to have to retype it or wire it from somewhere awkward.
The use case that makes it click is automation. Say you're building a workflow that saves each image named after the LoRA that produced it, or a text node that prints "Model: X, LoRA: Y" into the image metadata. You wire LoraName's lora_name output into a string-formatter (the same pack's String Format works great for this) and now the name flows into the filename automatically. Change the LoRA in the dropdown and every downstream string updates with it. One source of truth instead of three typed copies - that's the entire point of value nodes, and this is exactly that pattern wearing a LoRA-specific hat.
Mechanically it's trivial under the hood: the input is an enum generated from folder_paths.get_filename_list("loras"), and the function just returns the chosen string. The output is typed * (any), which means you can plug it into a string input, a text box that's been converted to an input, or just about anything that accepts text. It's a utility, so don't overthink the types - if a socket accepts it, it accepts it.
The inputs that matter
Just one:
lora_name- the dropdown of LoRA files in yourmodels/lorasfolder. That's it.
Output: lora_name, the selected filename as a string (e.g. detail_tweaker_v2.safetensors).
Where it fits
This node is one of a matching set in the pack - there's a UNETName, VAEName, CheckpointName, CLIPName, ControlNetName, and UpscaleModelName doing the identical trick for their own model folders. If you've got one of them in a workflow, you basically understand all of them. The family is most valuable once you start auto-naming outputs or building prompt templates that reference which model you used - a habit that pays off when you're looking at fifty generated files later and wondering which LoRA made which.
It's also a genuinely beginner-friendly node to play with if you're learning how "convert widget to input" works: because the output is a plain string, you can wire it into almost any text slot and watch it behave exactly like typing the name yourself.
Installing it
Part of lhaoyun6/ComfyUI-lhyNodes. Install through ComfyUI Manager by searching for lhyNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
python -m pip install -r ComfyUI-lhyNodes/requirements.txt
Restart afterwards. The pack pulls in ultralytics, opencv-python, numpy, and yarl; this node needs none of them to run and downloads no models. If you only ever type one LoRA name per session, you don't need this. If you're building workflows you'll reuse, it's the difference between hardcoding names and letting the graph know what it's doing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_name | COMBO | The name of the LoRA. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lora_name | * | — |