Stable Diffusion: How to check if safetensors model file corrupted

Alien checklist

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

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

In my case

** 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.

You May Also Like

About the Author: vo