ComfyUI Node

LoRAname (by Index)

A Numbered List of LoRA Names, With No Loading Attached

By hubentu·Created about a year ago·Updated 12 months ago· 2
LoRAname (by Index)
    • lora_name
    index0
    LoRAnamesLoRAname1.safetensors LoRAname2.safetensors LoRAname3.safetensors

    This one does the selecting and nothing else. You paste a list of LoRA filenames, one per line, dial an index, and out comes a single filename string. No model input, no strengths, no loading, no MOD/CLIP outputs - just a name, picked by number. The pack's README is explicit about the intended shape: connect its output to a standard Load LoRA node's lora_name input, and you've turned the stock loader into a dynamically switchable one.

    It's the stripped-down sibling of the pack's DynamicLoRALoader, which does the same index-picking and the loading. If you want to keep the actual LoRA application on ComfyUI's stock node - so everything downstream behaves exactly like vanilla - this is the node that only makes the choice dynamic.

    How it works

    Same pattern as the pack's other index nodes: LoRAnames is a multiline string, execution splits it on newlines, strips whitespace, drops empty lines, and returns the line at index. Out-of-range falls back to line 0 with a console message; an empty list returns an empty string. No file system scanning, no validation against your loras folder - it will happily hand back a filename that doesn't exist, because checking files is the loader's job, not its job.

    The inputs and output

    • LoRAnames - multiline text, one filename per line, .safetensors extension included.
    • index - which line to return, 0 to 99.

    Output: lora_name, a plain string.

    The honest wrinkle

    The README says "connect directly to a standard Load LoRA node." True-ish, with a catch you'll hit on some ComfyUI versions: Load LoRA's lora_name input is a dropdown (combo type), and a plain STRING output doesn't always seat into it. If the connection won't take, that's precisely what the pack's LoRAStringAdapter is for - it re-types your string into the combo type the stock loader expects, so MultiLoRAnameLoader → LoRA String Adapter → Load LoRA is the version of this flow that always works. Or skip the middleman and use DynamicLoRALoader, which selects and loads in one node.

    Why reach for it

    Honestly? Mostly for the separation of concerns, or because you're already standardizing on stock Load LoRA nodes in your workflows and just want a number-driven name picker feeding them. It's a thin utility - zero search impressions, no community chatter - and it's fine that way. Small tool, small job, and it does the job.

    Installing it

    ComfyUI Manager, search "loras-loader" (or "Multiple LoRA Loader"), install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hubentu/ComfyUI-loras-loader
    

    No requirements.txt, no model downloads. The whole pack is dependency-free, and this is the most dependency-free node in it.

    Categoryutils

    Inputs (2)

    NameTypeDefaultDescription
    indexINT00–99
    LoRAnamesSTRINGLoRAname1.safetensors LoRAname2.safetensors LoRAname3.safetensors

    Outputs (1)

    NameTypeDescription
    lora_nameSTRING