CKPT vs SafeTensors for Stable Diffusion

Many people in the Stable Diffusion community are still confused about the different file formats when it comes to Stable Diffusion models and checkpoints. The two formats are .ckpt and .safetensors – which one should we be using?

Both of the formats achieve the same results, so some people are left wondering if it actually matters which one you use. The short answer is yes, it does matter! In fact, official staff members from Stability AI have actually urged people to exclusively use the SafeTensors format, especially for SDXL models. (Reddit thread from Stability AI staff: https://www.reddit.com/r/StableDiffusion/comments/14mrl1g/warning_never_open_a_ckpt_file_without_knowing/).

Benefits of Using SafeTensors

The main reason that people should switch over to using SafeTensors exclusively is for security concerns. CKPT files are not safe and can contain all sorts of malware, spyware, and other bad stuff. SafeTensors, on the other hand, are basically just a bunch of numbers, making it impossible to package malicious programs inside.

On top of the improved security, SafeTensors actually loads models faster than .ckpt files! There’s really no reason to be using the.ckpt format anymore. The only situation where you will likely use it, is if you are trying to use an older SD model which was created before SafeTensors became the standard. In this situation, it’s important that you read all the comments and ensure that the .ckpt file is clean. Some platforms, such as Hugging Face and Civitai will do this automatically by scanning the pickle files.

It can be frustrating when the model you’re trying to use only has a .ckpt file available. Many model creators are beginning to convert their file formats over to SafeTensors, although it can be a time-consuming process. As more models are released, we expect to see the vast majority of them prioritizing SafeTensors, especially once the SDXL model is released to the public.

So, while both .ckpt and .safetensors can achieve the same goal of running a Stable Diffusion model – SafeTensors is clearly the better and safest option! If you’re feeling adventurous, there are methods for converting .ckpt files into .safetensors, although it doesn’t always work depending on the model. Here is the GitHub repository which can point you in the right direction for converting: (https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI).

Alternatively, the NMKD Stable Diffusion interface also has built-in tools for converting .ckpt models to SafeTensors.