Nodes/comfyui-toml-prompt/MultipleLoraTagLoader
ComfyUI Node

MultipleLoraTagLoader

Pick ten LoRAs, get a tag list back

By morino-kumasan·Created 2 years ago·Updated a day ago· 1
MultipleLoraTagLoader
    • STRING
    lora_name_0
    strength_00.00
    lora_name_1
    strength_10.00
    lora_name_2
    strength_20.00
    lora_name_3
    strength_30.00
    lora_name_4
    strength_40.00
    lora_name_5
    strength_50.00
    lora_name_6
    strength_60.00
    lora_name_7
    strength_70.00
    lora_name_8
    strength_80.00
    lora_name_9
    strength_90.00

    MultipleLoraTagLoader doesn't load anything. Despite the name, it builds text: ten pairs of LoRA-name dropdown + strength number go in, one newline-separated string of <lora:name:strength> tags comes out. You then wire that string into a node that actually loads them - LoadLoraFromLoraList or MultipartCLIPTextEncode in this same pack.

    Why bother with the indirection? Because in this pack's world the LoRA stack is data. A tag list is something a TOML prompt file can carry, something you can concatenate, and something you can feed into a text node and read back. This node is the friendly editor for that list when you'd rather click dropdowns than type tags.

    How it works

    Ten lora_name_N inputs are dropdowns populated from ComfyUI's own models/loras listing ([none] is the empty option), each paired with a strength_N float from -100 to 100. The output is built like this:

    "<lora:{}:{:2f}>".format(kwargs[f"lora_name_{i}"], kwargs[f"strength_{i}"])
    

    with two skip conditions per slot: the name must not be [none], and the absolute strength must be at least 1e-10. In plain terms: strength 0 means "off." You don't have to reset the dropdown to disable an entry - zero the strength and it disappears from the output. Negative strengths work (they pass the absolute-value test), which is how you use a LoRA as a subtractive correction.

    Formatting is {:2f} - two decimal places - so 0.7 comes out as 0.70. Harmless for every loader that parses these tags, just don't be surprised by it if you're diffing strings.

    Inputs and outputs

    lora_name_0lora_name_9, strength_0strength_9. That's all twenty. One STRING output, tooltip: "LoRA tag list separated by line break" - so tags are one per line, which is the format the loader nodes expect.

    Install

    Manager search for the pack, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/morino-kumasan/comfyui-toml-prompt
    

    restart ComfyUI. No pip install; the repo's requirements.txt is empty and the only thing it needs from ComfyUI is folder_paths.get_filename_list("loras"). The pack's README install block is stale (old comfyui-utils name, SSH clone URL).

    Where people get burned

    Freshly-downloaded LoRAs aren't in the dropdown. The list is built once when the node class is defined, i.e. at ComfyUI startup. Drop a new .safetensors into models/loras and this node will not show it until you restart or reload the node definitions. Same story as the pack's PromptLoader and its prompt files.

    Subfolders show up with forward slashes. If you keep LoRAs organised in folders, the dropdown shows style/mylora.safetensors and that's exactly what goes into the tag - the loaders normalise separators themselves, so don't "fix" it by hand.

    The exact ten-slot ceiling is real. It's hardcoded. Eleven LoRAs means a second node and a StringConcat, or just type the extra tag yourself. Also worth knowing: a silence here is not a guarantee - strength 0.001 passes the threshold and produces a tag with an effectively invisible effect.

    Categoryutils

    Inputs (20)

    NameTypeDefaultDescription
    lora_name_0COMBOLoRA file name.
    strength_0FLOAT0.00-100–100Modify strength.
    lora_name_1COMBOLoRA file name.
    strength_1FLOAT0.00-100–100Modify strength.
    lora_name_2COMBOLoRA file name.
    strength_2FLOAT0.00-100–100Modify strength.
    lora_name_3COMBOLoRA file name.
    strength_3FLOAT0.00-100–100Modify strength.
    lora_name_4COMBOLoRA file name.
    strength_4FLOAT0.00-100–100Modify strength.
    lora_name_5COMBOLoRA file name.
    strength_5FLOAT0.00-100–100Modify strength.
    lora_name_6COMBOLoRA file name.
    strength_6FLOAT0.00-100–100Modify strength.
    lora_name_7COMBOLoRA file name.
    strength_7FLOAT0.00-100–100Modify strength.
    lora_name_8COMBOLoRA file name.
    strength_8FLOAT0.00-100–100Modify strength.
    lora_name_9COMBOLoRA file name.
    strength_9FLOAT0.00-100–100Modify strength.

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGLoRA tag list separated by line break