Skip to content

Commit

Permalink
Update readme and remove parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerBOO committed Apr 1, 2023
1 parent 14254f5 commit 14b1e12
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 124 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ __pycache__
.venv

meta

# using prettier for formatting the markdown
.prettierrc
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# LoRA inspector

<!--toc:start-->

- [LoRA inspector](#lora-inspector)
- [Install](#install)
- [Usage](#usage)
Expand All @@ -9,12 +10,19 @@
- [Development](#development)
- [Future](#future)
- [Reference](#reference)
<!--toc:end-->
<!--toc:end-->

Inspect LoRA files for meta info (and hopefully quantitative analysis of the LoRA weights)
Inspect LoRA files for meta info (and hopefully quantitative analysis of the
LoRA weights)

- view training parameters
- extract metadata to be stored (we can store it in json currently)
- extract metadata to be stored (we can store it in JSON currently)

---

_NOTE_ this is a work in progress and not meant for production use. _NOTE_

---

## Install

Expand All @@ -27,7 +35,11 @@ torch
safetensors
```

Can install them using `pip install torch safetensors`, make a venv/conda with them, or add this script to your training directory (to access the dependencies).
Can install them one of the following:

- `pip install torch safetensors`,
- make/use with a venv/conda
- add this script to your training directory (to access the dependencies).

## Usage

Expand Down Expand Up @@ -116,7 +128,9 @@ network dim/rank: 8.0 alpha: 4.0 module: networks.lora

### Save meta

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 meta directory.
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 meta directory.

```bash
$ python lora-inspector.py ~/loras/alorafile.safetensors --save_meta
Expand All @@ -135,7 +149,7 @@ network dim/rank: 8.0 alpha: 4.0 module: networks.lora

## Development

Formatted using [`black`](https://github.com/psf/black).
Formatted using [`black`](https://github.com/psf/black).

## Future

Expand Down
118 changes: 0 additions & 118 deletions parsers.py

This file was deleted.

0 comments on commit 14b1e12

Please sign in to comment.