Nodes/AAA Metadata System/LoRA Bulk Operations v03
ComfyUI Node

LoRA Bulk Operations v03

Auto-Detect Every LoRA's Architecture in One Operation

By EricRollei·Created 10 months ago·Updated 9 months ago· 13
LoRA Bulk Operations v03
    • operation_result
    • detailed_log
    • items_processed
    operation_typeAuto-Detect Architecture
    filter_architectureAny
    filter_categoryAny
    confirm_operationfalse
    new_architectureSD1.5
    new_categoryunknown
    rating_threshold3
    export_filenamelora_export
    path_filter

    The whole LoRA Tester family in this pack assumes you've got a database of annotations for your LoRAs - and if you haven't built one, LoRA Bulk Operations v03 is the jump-start. It's a six-tool Swiss Army node that works on your whole collection at once. The headline operation is Auto-Detect Architecture, which reads each .safetensors file and figures out what base model it belongs to (SD1.5, SDXL, Flux, Pony, and so on) without you opening anything. If your library is a sea of Unknown entries, this is the operation that fixes the sea.

    The other five operation_type choices round it out: Bulk Categorize stamps a category across filtered LoRAs, Fetch All Triggers queries Civitai's public API by file hash to pull trigger words for anything missing them, Apply Ratings Filter filters by your quality ratings, Export Filtered Set writes the matching set to a file, and Import Metadata loads an exported set back in. Filtering is done through filter_architecture (Any, SD1.5, SDXL…) and filter_category (Any, style, character, …), with an optional path_filter substring to narrow by folder.

    The one input to actually respect is confirm_operation, which defaults to false and must be turned on for the operation to run. That's a safety gate, not a formality - these operations rewrite your LoRA database in bulk, and the author put a confirmation in because one mis-clicked bulk operation is how you lose a day of annotations. The related optional inputs feed specific operations: new_architecture and new_category for the bulk-update ops, rating_threshold (1–5) for the ratings filter, and export_filename for exports.

    Outputs are operation_result (STRING), detailed_log (STRING), and items_processed (INT). Mechanically, the heavy lifting is a mix of hashing and inspecting safetensors metadata for architecture detection, plus a Civitai API call (model-versions/by-hash) for trigger fetching - that one needs internet, but no API key, and results are cached so you don't hammer the API on every run.

    Two honest caveats. First, architecture auto-detection is only as good as the metadata embedded in the file; some LoRAs genuinely don't declare their base model, and those stay Unknown no matter what. Second, the pack is a one-author project with zero community footprint - Civitai's API could change its response shape and this node would break until the author updates it, so treat "Fetch All Triggers" as a convenience, not a guaranteed permanent feature.

    Install the pack and restart, then find it under loaders/lora tester:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/AAA_Metadata_System
    cd AAA_Metadata_System
    pip install -r requirements.txt
    

    Set operation_type to Auto-Detect Architecture, point it at your library, flip confirm_operation on, and run. One queue press later your mystery LoRAs have names.

    Categoryloaders/lora tester

    Inputs (9)

    NameTypeDefaultDescription
    operation_typeCOMBOAuto-Detect ArchitectureType of bulk operation
    filter_architectureCOMBOAnyFilter by architecture
    filter_categoryCOMBOAnyFilter by category
    confirm_operationBOOLEANfalseConfirm bulk operation (required for safety)
    new_architectureoptCOMBOSD1.5New architecture for bulk update
    new_categoryoptCOMBOunknownNew category for bulk update
    rating_thresholdoptINT31–5Minimum rating for filtering
    export_filenameoptSTRINGlora_exportFilename for export operations
    path_filteroptSTRINGFilter by path substring (optional)

    Outputs (3)

    NameTypeDescription
    operation_resultSTRING
    detailed_logSTRING
    items_processedINT