
SD models are usually large files, and with a poor internet connection, downloading them can be interrupted and restarted. So it would be helpful if you could validate the model file. Fortunately, this is easy to do.
As a first step you need to find your python installation path.
I’m using Automatic1111 on Windows so my python location is
- D:\AI\automatic1111\system\python\python.exe
If you use linux you can just run next in terminal
1 2 3 |
$ which python |
Then you need to find full path to the model that you want to verify, in my case it’s
- D:\AI\automatic1111\webui\models\Stable-diffusion\cyberrealistic_v50-inpainting.safetensors
Then combine this with the next template
1 2 3 |
<python> -m safetensors.torch metadata <path-to-model> |
In my case
1 2 3 |
D:\AI\automatic1111\system\python\python.exe -m safetensors.torch metadata D:\AI\automatic1111\webui\models\Stable-diffusion\cyberrealistic_v50-inpainting.safetensors |
** dont’t forget to use quotes in case if your path has spaces in the folder or file names
As a result python will read the file. If the file corrupted you’ll see errors, if not then command will be executed without output.
That’s all.