ComfyUI Node

Lora Selector

Pick a LoRA, and get its name handed to you as a string at the same time

By PressWagon·Created 2 years ago·Updated about a year ago· 3
Lora Selector
    • LORA_NAME
    • metadata
    lora_name

    Lora Selector exists because the stock LoRA loaders are weirdly stingy with information. The regular Load LoRA node takes a filename and gives you a model - it never tells you which LoRA it used as a plain string you can do anything with. That's fine until you want to write "used style/chic.safetensors at 0.8" into the metadata your image saver embeds, so Civitai (or just future you) knows what went into the render. This node solves exactly that: one dropdown, two outputs, same value.

    How it works

    It's a splitter wearing a picker's clothes. You pick a lora_name from the dropdown, which is populated from your ComfyUI/models/loras folder - including any subfolders, so you'll see paths like style/aurora.safetensors, not just bare filenames. The node then emits the same string out of two outputs:

    • LORA_NAME - typed so it plugs straight into any LoraLoader's lora_name input. This is the clever part: the output type matches what the loader expects, so the wire just snaps in.
    • metadata - a plain STRING with the same value, which you can feed into a text formatter, a wildcard, or a metadata saver.

    The whole thing is two lines of Python (output = str(lora_name)), which is honestly the appeal. No hidden state, no surprises. It's the building block the rest of the pack's metadata workflow stands on.

    What you actually wire up

    The intended pattern, straight from the pack's demo workflow, is three branches off one node:

    1. LORA_NAME → your LoRA loader → model → sampler.
    2. metadata → FormatConcatStrings or FormattingSingle → your metadata string.
    3. That string → something like comfy-image-saver's SDPromptSaver, which writes it into the PNG so the "used LoRAs" part of your Civitai upload is complete and correct.

    The "save generation data" angle is the pack's whole reason for existing - the README says as much - and it maps onto a real community pain point: getting ComfyUI's saved metadata to actually list the LoRAs you used without turning your graph into spaghetti. This node is the tidy half of that solution.

    Installing it

    You're installing the whole ComfyUI-StringsAndThings pack - this node can't come alone. Easiest route is ComfyUI Manager: search for "ComfyUI-StringsAndThings" and click install, then restart. Or, old-school:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PressWagon/ComfyUI-StringsAndThings
    # restart ComfyUI
    

    No model downloads, nothing heavy - the pack's one genuinely extra dependency is scipy (for the Fourier node), and everything else is already in ComfyUI. If Manager auto-installs requirements.txt, be aware it pins exact torch/numpy versions; that's normally a no-op against an existing install, but if ComfyUI stops starting afterward, check your Python env didn't get a different torch. Manual install avoids that entirely if you already have scipy.

    Caveats worth knowing

    • The metadata output is just the filename, extension included. It won't tell you the weight you applied - that number lives on your LoraLoader, and no node in this pack reads it back.
    • Like everything in Strings&Things, this node isn't batch-aware. Fine for the 95% of workflows that load LoRAs once per run.
    • If your saver wants LoRAs as a list rather than a single string (multi-LoRA workflows), pair this with the pack's PWLoraNameCollector instead.
    CategoryStrings&Things

    Inputs (1)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    LORA_NAME
    metadataSTRING