ComfyUI Node

Lora

Render one prompt across every LoRA in your folder without rebuilding the graph

By M1kep·Created 3 years ago·Updated 2 years ago· 118
Lora
    • Selected Loras
    literal

    LoRAs are the standard way to steer a model - a style, a character, a concept - and the way people actually pick one is by comparison: same prompt, same seed, different LoRA, look at the grid. Do that with a handful of LoRAs and you're rebuilding or rewiring your graph for each one. This node exists to make that comparison one pass: it lists every LoRA you own, you keep the ones you want, and it hands the names downstream as a single list.

    How it works. Identical mechanics to its sibling Checkpoint node in the same pack. When you add it, ComfyUI reads folder_paths.get_filename_list("loras") - the same internal list the standard LoraLoader dropdown uses - and pre-fills the literal text box with one filename per line. Run it and parse_literal splits on newlines and drops empty lines, so whatever lines you left in the box are your output. Names in, names out; nothing is actually loaded here.

    The trap, and it's the same one as Checkpoint. The box starts filled with every LoRA in your models/loras folder, not a blank placeholder. Hit run without trimming and you've told your batch machinery you want your entire collection. For a comparison grid that's a huge render batch. Highlight and delete the lines you don't want before running. This is the single most common way this node surprises people, and it's entirely avoidable.

    Inputs and output. One input: literal, the multiline pre-filled box. One output: Selected Loras, typed * (ComfyUI's wildcard type) and marked as a list. Because it's a wildcard, it can feed any node that accepts a list of LoRA filenames - which is why it rides along in grid and batch workflows - but ComfyUI also won't type-check it, so you can wire it into a plain single-LoRA loader and get silent nonsense instead of an error. The names it emits are exactly what LoraLoader's dropdown shows, subfolder prefixes included (styles/thatOneStyle.safetensors), and they're strings - you still need a loader or loop wrapper on the far side to turn them into weights. And one more honest caveat: the names only, not strengths. If your comparison is really "same LoRA at different strengths," you're better off with a node that takes a list of (name, weight) pairs.

    Installing it. The whole ComfyLiterals pack installs the same way, and it's about as light as custom nodes get: no requirements.txt, no Python dependencies, no model downloads.

    # via ComfyUI Manager: search "ComfyLiterals", install, restart ComfyUI
    
    # or manually
    cd ComfyUI/custom_nodes
    git clone https://github.com/M1kep/ComfyLiterals
    

    then restart. On startup the pack symlinks a small js/ folder into web/extensions/ComfyLiterals for its Operation node; if that symlink fails on Windows the console tells you to copy it manually - and this node works regardless, since it's plain Python.

    Troubleshooting. "Missing node: Lora" on a downloaded workflow means ComfyLiterals isn't installed - grab it via Manager and restart fully (browser refresh alone won't re-register nodes). If a fresh node looks overwhelming, that's just your whole LoRA folder; trim to the few you're comparing. And if the pack's other literal nodes are missing while this one loads, that's the known flakiness of old packs against newer ComfyUI frontends - the Python side is fine and restarting clean usually sorts it.

    CategoryList Stuff

    Inputs (1)

    NameTypeDefaultDescription
    literalSTRING

    Outputs (1)

    NameTypeDescription
    Selected Loras*