.SAFETENSORS File Extension

Stable Diffusion Model

Developer Hugging Face
Popularity
4.0  |  5 Votes
 

What is a SAFETENSORS file?

A SAFETENSORS file is a machine learning model created for use with Stable Diffusion, a text-to-image generator. It contains algorithms that Stable Diffusion uses to produce images. SAFETENSORS files are similar to .CKPT files, but considered safer to use because they cannot contain malicious code.

More Information

Stable Diffusion is an AI-based image generation app developed by Stability AI. It allows users to input text and generate (or edit) a resulting image.

To create images, Stable Diffusion uses a machine learning model that interprets the text a user has entered and translates it into an image. Users can create their own models for use with Stable Diffusion or download existing models from the internet. Many of these models are saved in the SAFETENSORS format, developed by the Hugging Face community (comprised of AI app enthusiasts and developers).

Primarily, Hugging Face developed the SAFETENSORS format to fix vulnerabilities in the CKPT model format. CKPT files can contain malicious Python code that a user might accidentally execute while using those models; SAFETENSOR files cannot. Additionally, Stable Diffusion can load and switch between SAFETENSOR models more quickly than it can CKPT models.

Where to get SAFETENSORS files

You can download many SAFETENSORS files from the Models section of Hugging Face's website.

How to open a SAFETENSORS file

To use a SAFETENSOR file with Stable Diffusion, you must place it in the directory from which your version of Stable Diffusion loads models. However, different variants of Stable Diffusion (such as AUTOMATIC1111 Stable Diffusion Web UI and NMKD Stable Diffusion GUI) load models from different directories. If you don't know where to place your SAFETENSOR file, refer to your version of Stable Diffusion's documentation.

Then, load your SAFETENSOR file as you would any Stable Diffusion model, from within the app itself.

Open over 400 file formats with File Viewer Plus.Free Download

Programs that open SAFETENSORS files

Windows
Various Stable Diffusion variants
Mac
Various Stable Diffusion variants
Linux
Various Stable Diffusion variants

Verified by FileInfo.com

The FileInfo.com team has independently researched the Stable Diffusion Model file format and Mac, Windows, and Linux apps listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verified.

If you would like to suggest any additions or updates to this page, please let us know.