ComfyUI Node

YAML LoRA Loader

Validated LoRA names from YAML, with per-run overrides you don't have to file-edit for

By avocadori·Created about a year ago·Updated about a year ago· 0
YAML LoRA Loader
    • prompt
    • lora1
    • lora2
    • lora3
    yaml_pathsetting.yaml
    category
    lora1_overrideNone
    lora2_overrideNone
    lora3_overrideNone

    YAML LoRA Loader is the node you pick when the YAML file is your source of truth but you still want to feed a plain, standard ComfyUI LoraLoader - not build prompt strings, not talk to a Wan wrapper. Give it a category and it returns the category's prompt plus up to three LoRA names, each one validated against your models/loras folder so you're not wiring garbage into the graph.

    The feature that actually makes it worth installing, though, is the overrides. Every LoRA slot has a dropdown populated from the LoRAs you actually own, defaulting to None. Set one and it replaces whatever the YAML says for that slot - no editing the file between runs. That's the workflow-saver: you keep a character's config in YAML, and when you want to A/B a different character LoRA against the same reference frames, you change a dropdown instead of opening a text editor.

    How it works

    Same parsing as the pack's extractor - <lora:name:weight> unwraps to the name - but the behavior differs in two ways. First, the returned names are extension-stripped, which is the form a standard LoraLoader's lora_name input expects. Second, validation is stricter: if a name can't be matched against your lora list (case-insensitively), it doesn't return the original string and hope - it returns the literal "None" and prints a warning.

    Inputs and outputs

    • yaml_path - default setting.yaml, relative to ComfyUI's working directory.
    • category - dropdown of your YAML's categories, or free text if the file wasn't found at startup.
    • lora1_override / lora2_override / lora3_override - optional dropdowns of your installed LoRAs (extension-stripped), default None. Choose one to override that slot.

    Outputs are prompt (STRING) and lora1/lora2/lora3 (STRING) - clean names ready for LoraLoader's lora_name input, or "None" when validation failed.

    The trap: silent failure

    A missing or misspelled LoRA does not error the graph. The node logs a warning and returns "None", and your run proceeds - with that LoRA simply not applied. If you've ever stared at a batch of images wondering why a style LoRA had no effect, this is a plausible culprit. When you set up a YAML category, glance at the console once and make sure every name resolved.

    Installing

    No requirements.txt, nothing to pip install - the pack only uses modules ComfyUI already has:

    cd ComfyUI/custom_nodes
    git clone https://github.com/avocadori/ComfyUI-load-image-prompt-lora
    

    Restart, or install via ComfyUI Manager by searching ComfyUI-load-image-prompt-lora.

    When to use the sibling instead

    If you need name and weight as separate values (a Wan Lora Select-style node, or reconstructing <lora:name:weight> for prompts), that's YAMLLoRAExtractor. If you want YAML LoRAs fed straight into a Wan pipeline as a WANVIDLORA, that's YAMLLoRASelector. This node's niche is narrower: validated names for the standard loader, plus overrides you can flip without touching the file.

    CategoryLoaders

    Inputs (5)

    NameTypeDefaultDescription
    yaml_pathSTRINGsetting.yaml
    categorySTRING
    lora1_overrideoptCOMBONone1 options: None
    lora2_overrideoptCOMBONone1 options: None
    lora3_overrideoptCOMBONone1 options: None

    Outputs (4)

    NameTypeDescription
    promptSTRING
    lora1STRING
    lora2STRING
    lora3STRING