santa hat
deerdeer nosedeer glow
Sign In

保存 civitai 的 .safetensors 模型的 metadata / Saving metadata of .safetensors file on civitai


.safetensors 文件的 metadata 字段可能保存了模型的训练数据,包括学习率、数据集重复次数等参数,使用本脚本可以直接从 的模型页面导出模型的 metadata。

This is a simple script that allows you to export the metadata of .safetensors files on The metadata may include some training parameters such as learning rate and dataset repetition etc and you can use these parameters to your project or anywhere you want.

使用方法 / Usage

1. 安装油猴扩展 / Install Tampermonkey

2. 从 GreasyFork 或者 Github 安装脚本 / Install my script from GreasyFork or Github



3. 刷新网页,进入一个模型页面 / Refresh the page and go to a model page

在按钮旁边应该有个复制按钮 / You can see there is a copying button alongside the download button

4. 点击该按钮即可导出模型的 metadata / Click the copying button and then you can export the metadata of the model

如果你觉得这个脚本对你有帮助的话可以点个 star / Please give me a star if you think this script is useful :).


从其它网站读取 .safetensors 文件的 metadata

见 SafetensorsHeaderReader 类