Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
by321 authored Aug 24, 2023
1 parent af4636b commit 71e9c7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The most useful thing is probably the metadata command:

python safetensors_util.py metadata input_file.safetensors -pm

Many safetensors files, especially LoRA files, have a __metadata__ field in the file header that records training information, such as learning rates, number of epochs, number of images used, etc. You can see how your favorite file was trained and perhaps use some of the training parameters for your own model in the future.
Many safetensors files, especially LoRA files, have a \_\_metadata\_\_ field in the file header that records training information, such as learning rates, number of epochs, number of images used, etc. You can see how your favorite file was trained and perhaps use some of the training parameters for your own model in the future.

The optional **-pm** flag is meant to make output more readable. Because safetensors files only allow string-to-string dictionary in header, non-string values need to be quoted. Basically the **-pm** flag tries to turn this:

Expand All @@ -36,7 +36,8 @@ into this:
"img_count":60
}
},
You can create a JSON file containing a __metadata__ entry:

You can create a JSON file containing a\_\_metadata\_\_ entry:

{
"__metadata__":{
Expand Down

0 comments on commit 71e9c7a

Please sign in to comment.