Nodes/ComfyUI-JNK-Tiny-Nodes/Load LoRA with Name JNK
ComfyUI Node

Load LoRA with Name JNK

It doesn't load a LoRA, and that's the point

By AljnkΒ·Created about a year agoΒ·Updated 12 months agoΒ· 3
Load LoRA with Name JNK
    • lora_name
    • name
    β—„lora_nameβ–Ύβ–Ί

    Let's get the awkward part out of the way first: despite the name, this node never touches a LoRA's weights. Open the source and you'll see it's a dropdown plus one line of Python - os.path.splitext(os.path.basename(lora_name))[0] - which just strips the folder path and file extension off the filename you picked. No model loading, no VRAM, no patching. What it gives you is the name of a LoRA as a clean string, which sounds trivial until you've tried to build a workflow that records which LoRA produced an image.

    The whole point is the second output, name. You pick a LoRA in this node's dropdown, wire its first output into a regular core Load LoRA node (the one that actually applies weights), and feed name into your save nodes, your filename builder, or the metadata you attach to outputs. Now every render's filename can carry the LoRA that made it, automatically, with no retyping and no risk of the label drifting from what's actually applied. That's the "with Name" family's whole pitch across this pack: the model side of the graph stays boring, and the name side becomes queryable.

    Inputs and outputs

    Only one input matters, and it's the only one:

    • lora_name - a dropdown of everything in ComfyUI/models/loras/, subfolders included.

    Outputs:

    • lora_name - the full filename string (e.g. styles/watercolor_v2.safetensors). Wire this into the core Load LoRA node's lora_name slot.
    • name - the basename without extension (watercolor_v2). This is the one you actually reach for.

    Installing it

    This is part of the ComfyUI-JNK-Tiny-Nodes pack, so install is pack-level. In ComfyUI Manager, search for JNK, hit Install, restart. Or:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
    

    The pack's requirements.txt lists opencv-python, pygame, and google-genai, but this particular node needs none of them - it's pure ComfyUI core plus the stdlib. No model files to download.

    Where people get burned

    The trap is assuming the first output is a loaded LoRA. It is a string. If you hook it straight into a KSampler or a model, ComfyUI will just refuse the connection - the output type is text, not a LoRA. You still need a real Load LoRA node in your graph; think of this one as a name-holder that happens to double as a picker. The upside of it being so cheap is you can drop it anywhere without worrying about memory or load times. It's the kind of node you add for bookkeeping, not for effect - and once you're building batch workflows that save dozens of images per run, knowing exactly which LoRA each one used is worth the extra node.

    CategoryπŸ”§ JNK

    Inputs (1)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    lora_nameβ€”
    nameSTRINGβ€”