Sign In

LoRa Model and Metadata Modification

13
LoRa Model and Metadata Modification

Foreword

While preparing my first LoRa model I figured out, that the trigger word for use of the LoRa model in the Prompt is stored in the related .safetensor file. Renaming of the LoRa model after creation leads to a confusion between the filename and the related in the file stored trigger word.

Solution

A first solution handling this is using online services [1,4]. I found two online services and tested both successfully. Up to now I can say, both are working for me. Use both on your own risk.

Check them out here:

Further Informations

The lora-metadata-viewer is supported by CIVITAI [3]. For lorainfo.tools there is an article here on CIVITAI [5]. Both can be downloaded as zip-files from CIVITAI and then they can be used locally [3,5].

Outlook

In the next step, I will write a Python script that allows me to change the metadata. At the moment, the experimental script is not yet ready for publication. So far the Python script is hacker like. First attempts to change the metadata already look good. After a few setbacks, the newly created .safetensor file is recognized without error. Initially the created .safetensor file was shown as corrupt, although it looked correct at first glance.

Finally

Have a nice day! Have fun! Be inspired!

References

[1] https://xypher7.github.io/lora-metadata-viewer/

[2] https://github.com/Xypher7/lora-metadata-viewer

[3] https://civitai.com/models/249721/lora-metadata-viewereditor

[4] https://lorainfo.tools/

[5] https://civitai.com/models/269178/lora-info-editor-edit-or-remove-metadata-or-lora-yuan-or-lora

Further Resources

[A] https://civitai.com/models/297168/lora-metadata-shortenercleaner

13

Comments