Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Lora Selector (Object)
ComfyUI Node

EmAySee Lora Selector (Object)

Turn a dropdown choice into a ready-to-apply LORA_OBJECT

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Lora Selector (Object)
    • lora_object
    lora_name

    The front half of EmAySee's object-based LoRA pipeline

    EmAySee's LoRA nodes split into two pipelines, and this one is the entrance to the object pipeline. EmAySee_LoraNameSelector gives you a dropdown of every LoRA in your loras folder and outputs a LORA_OBJECT - the actual loaded weights - instead of a filename string. That object then feeds the pack's consumers: EmAySee_LoraProcessor (pick one of up to nine), or EmAySee_LoraStacker20 (apply up to twenty in sequence).

    So the division of labor is: select and load here, apply there. Compared to the string pipeline (LoraSelectorLoraLoaderFromInput), the object pipeline pre-loads the weights once and hands them around, which keeps the "which LoRA" decision separate from the "where in the graph it lands" wiring. If you're doing A/B LoRA comparisons or stacking a fixed roster of adapters, this is the cleaner path.

    How it works

    On execution it resolves the chosen name to a full path, loads the weights with ComfyUI's torch-file loader in safe mode, and outputs the raw state dict as a LORA_OBJECT. If the file can't be found, it logs Lora not found: <name> and outputs None - which the downstream consumers tolerate (they pass model and clip through when the object is None), so the graph won't hard-crash on a missing file.

    Inputs and output

    • lora_name - the dropdown, listing every LoRA in your models/loras/ folder.

    Output: lora_object (LORA_OBJECT) - the loaded weights, ready for LoraProcessor or LoraStacker20.

    Install

    From ComfyUI_EmAySee_CustomNodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
    # restart ComfyUI
    

    Or via ComfyUI Manager → "ComfyUI_EmAySee_CustomNodes". No extra dependencies.

    Gotchas

    The genuinely confusing bit is that the repo contains two classes with the same name (EmAySee_LoraNameSelector exists in two source files - one outputs a LORA_OBJECT, the other a plain STRING name). Which one you get at runtime depends on file load order inside the pack, which isn't something you control from the UI. If your node outputs a string where you expected an object (or the schemas don't match this page), that's the cause. Work around it by checking what type the output port actually is before wiring it. Also remember this node only loads - strengths and application happen downstream, so if you connect it straight to a sampler nothing will happen. And None on a missing file is silent-ish: no exception, just a console line and a null that passthroughs downstream.

    CategoryEmAySee/Loaders

    Inputs (1)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    lora_objectLORA_OBJECT