CivArchive
    Lora Sorter (python checkpoint type inspection tool) - v1.0
    NSFW
    Preview 111315291

    This is a pair of Python scripts that detect Lora base model types and move the Loras into appropriate folders.

    If you have 1000+ Loras in the same folder and you're not sure which one is SD, which is SDXL, which is Flux etc., this Python program analyzes all of them, generates a plan, and gives you a chance to check and correct its work before you execute the plan.

    There are three basic steps.

    1. scan the folder, analyze the files, generate the first CSV (spreadsheet) file

    2. read the CSV file, determine what goes where, show the plan to the user

    3. execute the plan

    NOTE: Between steps 2 and 3, you should open and review/correct the CSV file contents.

    The basic commands:

    1. python inspect_lora.py "X:\path_where_the_lora_safetensor_files_are\"

    2. python inspect_sort_lora.py lora_inspect_index.csv

    3. python inspect_sort_lora.py lora_inspect_index.csv --base "..." --apply

    I encourage you not to run "apply" until you have had a really good look at the second CSV file's contents (lora_inspect_index_sort_plan.csv), because this thing does make some mistakes, it often confuses older SD and SDXL loras or the ones that weren't generated cleanly.

    The point of the three step process is to give you a chance to correct its mistakes.

    PART 1/2 - inspect_lora.py

    • This will analyze all of the targeted Lora files and generate a CSV file.

    CSV columns that will be generated: (some will be unpopulated until the next step)

    • {path family, total_tensors, has_flux_blocks, has_input_blocks, has_down_blocks, has_dual_te, error, maybe_flux, maybe_sdxl, maybe_sd, maybe_lcm_turbo, maybe_ltxv, maybe_pony, maybe_ponyxl, maybe_qwen, maybe_wan, move destination}

    CLI Usage: (command line options):

    • python inspect_lora.py "D:\AI\stable-diffusion-webui\models\Lora\some_lora.safetensors"

    • python inspect_lora.py "D:\AI\stable-diffusion-webui\models\Lora\*.safetensors"

    • python inspect_lora.py "D:\AI\stable-diffusion-webui\models\Lora\SD\"

    PART 2/2 - inspect_sort_lora.py

    This script reads lora_inspect_index.csv and proposes (or applies) a sort of LoRAs by family. It is designed to work with the output from inspect_lora.py.

    This script...

    • loads that CSV

    • for each row with a valid path and no error, decides which "bucket" the LoRA belongs to (e.g. "SDXL", "SD15", "Flux", "Unknown")

    • optionally moves the files into subfolders based on that bucket

    • always writes a second CSV with the plan / results: lora_sort_plan.csv

    CLI Usage: (command line options):

    • python inspect_sort_lora.py lora_inspect_index.csv

    • python inspect_sort_lora.py lora_inspect_index.csv --base "D:\AI\stable-diffusion-webui\models\Lora"

    • python inspect_sort_lora.py lora_inspect_index.csv --base "..." --apply

    Description

    This is likely the only version of this program I will make, because I already used it and will sort Loras as I download them going forward. Basically, I had 600+ Loras and most of them were SDXL, then I downloaded a ton of new Flux Loras and they got all mixed up (because SOME PEOPLE don't know how to write the base model name in the Lora filename), so this was my tool to untangle the mess. Use at your own risk.

    Other
    Other
    by heyq

    Looks like we don't have an active mirror for this file right now.

    CivArchive is a community-maintained index — we catalog mirrors that volunteers upload to HuggingFace, torrents, and other public hosts. Looks like no one has uploaded a copy of this file yet.

    Some files do get recovered over time through contributions. If you're looking for this one, feel free to ask in Discord, or help preserve it if you have a copy.

    Details

    Downloads
    36
    Platform
    CivitAI
    Platform Status
    Deleted
    Created
    11/23/2025
    Updated
    4/21/2026
    Deleted
    4/15/2026

    Files

    loraSorterPython_v10.zip

    Mirrors

    CivitAI (1 mirrors)