A look at rockerBOO/lora-inspector: 101 stars on GitHub, written primarily in Python, tracked under the AI Tools category. LoRA (Low-Rank Adaptation) inspector for Stable Diffusion
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Inspect LoRA files for meta info and quantitative analysis of the
LoRA weights.
view training parameters
extract metadata to be stored (we can store it in JSON currently)
only safetensors are supported (want to support all LoRA files)
only metadata from kohya-ss LoRA (want to parse all metadata in LoRA files)
NOTE this is a work in progress and not meant for production use. NOTE
Consider using the new web interface LoRA Inspector for a GUI representation.
Install
Clone this repo or download the python script file.
Requires dependencies:
torch
safetensors
tqdm
Can install them one of the following:
Add this script to your training directory and use the virtual environment
(venv). RECOMMENDED
Make/use with a venv/conda
pip install safetensors tqdm (See
Get started for instructions on
how to install PyTorch)
Usage
Inspect
$ python lora-inspector.py --help
usage: lora-inspector.py [-h] [-s] [-w] [-t] [-d] lora_file_or_dir
positional arguments:
lora_file_or_dir Directory containing the lora files
options:
-h, --help show this help message and exit
-s, --save_meta Should we save the metadata to a file?
-w, --weights Show the average magnitude and strength of the weights
-t, --tags Show the most common tags in the training set
-d, --dataset Show the dataset metadata including directory names and number of images
We also have support for saving the meta that is extracted and converted from
strings. We can then save those to a JSON file. These will save the metadata
into meta/alorafile.safetensors-{session_id}.json in the current working
directory.
Find the average magnitude and average strength of your weights. Compare these
with other LoRAs to see how powerful or not so powerful your weights are. NOTE
Weights shown are not conclusive to a good value. They are an initial example.
$ python lora-inspector.py /mnt/900/lora/studioGhibliStyle_offset.safetensors -w
UNet weight average magnitude: 4.299801171795097
UNet weight average strength: 0.01127891692482733
Text Encoder weight average magnitude: 3.128134997225176
Text Encoder weight average strength: 0.00769676965767913
Tag frequency
Shows the frequency of a tag (words separated by commas). Trigger words are
generally the most frequent, as they would use that word across the whole
training dataset.
$ python lora-inspector.py -t /mnt/900/lora/booscapes.safetensors
...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Tags
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
4k photo” 23
spectacular mountains 17
award winning nature photo 16
ryan dyar 14
image credit nasa nat geo 11
sunset in a valley 11
garden 10
british columbia 10
dramatic autumn landscape 10
autumn mountains 10
an amazing landscape image 10
austria 9
nature scenery 9
pristine water 9
boreal forest 9
scenic view of river 9
alpes 9
mythical floral hills 8
misty environment 8
a photo of a lake on a sunny day 8
majestic beautiful world 8
breathtaking stars 8
lush valley 7
dramatic scenery 7
solar storm 7
siberia 7
cosmic skies 7
dolomites 7
oregon 6
landscape photography 4k 6
very long spires 6
beautiful forests and trees 6
wildscapes 6
mountain behind meadow 6
colorful wildflowers 6
photo of green river 6
beautiful night sky 6
switzerland 6
natural dynamic range color 6
middle earth 6
jessica rossier color scheme 6
arizona 6
enchanting and otherworldly 6
Dataset
A pretty basic view of the dataset with the directories and number of images.
Regularization images: number of regularization images
Scheduler: the learning rate scheduler (cosine, cosine_with_restart, linear,
constant, …)
Optimizer: the optimizer (Adam, Prodigy, DAdaptation, Lion, …)
Network dim/rank: the rank of the LoRA network
Alpha: the alpha to the rank of the LoRA network
Module: the python module that created the network
Noise offset: noise offset option
Adaptive noise scale: adaptive noise scale
IP noise gamma: Input Perturbation noise gamma
Input Perturbation Reduces Exposure Bias in Diffusion Models
…we propose a very simple but effective training regularization,
consisting in perturbing the ground truth samples to simulate the
inference time prediction errors.
multires noise discount: multires noise discount (See
Multi-Resolution Noise for Diffusion Model Training)
multires noise scale: multires noise scale
average magnitude: square each weight, add them up, get the square root
average strength: abs each weight, add them up, get average
debiased estimation loss:
Debias the Training of Diffusion Models
Update metadata
Simple script to update your metadata values. Helpful for changing
ss_output_name for applications that use this value to set a good name for it.
To see your current metadata values, save the metadata using
lora-inspector.py --save_meta ... and inspect the JSON file.
$ python update_metadata.py --help
usage: update_metadata.py [-h] [--key KEY] [--value VALUE] safetensors_file
positional arguments:
safetensors_file
options:
-h, --help show this help message and exit
--key KEY Key to change in the metadata
--value VALUE Value to set to the metadata
Usage
$ python update_metadata.py /mnt/900/lora/testing/armored-core-2023-08-02-173642-ddb4785e.safetensors --key ss_output_name --value mechBOO_v2
Updated ss_output_name with mechBOO_v2
Saved to /mnt/900/lora/testing/armored-core-2023-08-02-173642-ddb4785e.safetensors
Does rockerBOO/lora-inspector have a project website?
No homepage URL was recorded for rockerBOO/lora-inspector in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on rockerBOO/lora-inspector?
The most recent commit recorded on rockerBOO/lora-inspector was 11 days ago, based on the GitHub push timestamp. The repository has 7 forks — one of the better signals of community interest.
How many stars does rockerBOO/lora-inspector have?
rockerBOO/lora-inspector has 101 GitHub stars — refresh the page for the live number, or check github.com/rockerBOO/lora-inspector. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is rockerBOO/lora-inspector open source?
Yes — rockerBOO/lora-inspector ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/rockerBOO/lora-inspector.
What else is in the AI Tools space?
rockerBOO/lora-inspector is tracked by TopGit under the AI Tools category, alongside 5 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What topics is rockerBOO/lora-inspector associated with?
GitHub's repository topics for rockerBOO/lora-inspector: "analysis", "lora", "low-rank-approximation", "machine-learning", "pytorch". TopGit's editorial category is AI Tools.
Where do I read more about rockerBOO/lora-inspector?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/rockerBOO/lora-inspector is the definitive source.
Read full README in the tab above.
Still deciding about lora-inspector?
One click hands the question to an AI along with this page — see what it says about lora-inspector.