Nodes/OmniNodes/LoRA Metadata Diff πŸ†š
ComfyUI Node

LoRA Metadata Diff πŸ†š

Diff two LoRAs side by side before you upload a batch

By TensorVizionΒ·Created 3 months agoΒ·Updated about 8 hours agoΒ· 0
LoRA Metadata Diff πŸ†š
    • diff_report
    • structurally_compatible
    β—„lora_name_aβ–Ύβ–Ί
    β—„lora_name_bβ–Ύβ–Ί

    Your LoRA folder has grown to 200 files and some of them are from trainers that wrote sloppy metadata. LoRA Metadata Diff πŸ†š is the node that catches the embarrassing ones before they ship: it loads two LoRA files and diffs their structural metadata - rank, alpha, target modules, key and parameter counts - plus whatever embedded safetensors header metadata they carry (base model tag, trigger words, training params).

    The name undersells it slightly. It's not comparing the learned weights themselves; it's comparing the bookkeeping around them, which is exactly where LoRAs silently go wrong. "These two were trained on different base models" and "one of these lost its trigger-word metadata" are both diffs you want to catch before you upload a batch to CivitAI or hand a file to someone.

    How it works

    Both LoRA names come from ComfyUI's loras/ registry (the same dropdown source as the core LoRA loader - so files must be where ComfyUI looks, usually ComfyUI/models/loras/). The node reads each file's tensor structure to derive rank, alpha, and target-module prefixes, and reads the safetensors header for embedded metadata. The diff_report string lays out the two side by side and flags keys present in only one file, or present in both with different values. A structurally_compatible BOOLEAN gives you the bottom line - if it's False, these two live in different worlds and stacking them may not do what you expect.

    The inputs and outputs

    Two required inputs: lora_name_a and lora_name_b, both dropdowns of your installed LoRAs. Outputs are diff_report (STRING) and structurally_compatible (BOOLEAN). Wire the report into a text display; wire the boolean into a conditional if you want the workflow to branch on whether a pair is safe to combine.

    It's the two-file version of the pack's LoRA Info Inspector, and it's categorized under TensorVizion/Model - the pack's known quirk that a handful of model nodes land in a separate submenu from Model Utilities. Not a bug, just where to look in the search list.

    Installing it

    Same pack, same routine:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/TensorVizion/OmniNodes
    

    Restart ComfyUI (or find "OmniNodes" in ComfyUI Manager). No extra dependencies beyond what ComfyUI ships. If it doesn't show up, restart completely and check the terminal for [OmniNodes] βœ… Loaded lines.

    The honest limitation: it reports what's in the headers, and not every trainer writes useful headers. Two LoRAs that both say "SDXL base" can still behave differently in practice - but catching the mismatched-base-model case before it wastes an afternoon is more than worth the install.

    CategoryTensorVizion/Model

    Inputs (2)

    NameTypeDefaultDescription
    lora_name_aCOMBO0 options:
    lora_name_bCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    diff_reportSTRINGβ€”
    structurally_compatibleBOOLEANβ€”