Earngenix Logo
Skip to main content

Glossary · ComfyUI Basics

What Is a Safetensors File?

By Earngenix Team ·

⚡ Quick Answer

A .safetensors file is a format for storing AI model weights — checkpoints, LoRAs, VAEs, and more. It loads faster than older formats and, unlike .ckpt files, can't execute hidden code when opened.

Before safetensors existed, most Stable Diffusion models shipped as .ckpt files built on Python's pickle format — a format that can embed and run arbitrary code the moment it's loaded. Hugging Face built safetensors specifically to store only tensor data, with no code execution path at all, while also loading noticeably faster.

Where You'll See It

Almost every model folder in ComfyUI: models/checkpoints, models/loras, models/vae, models/clip, and models/controlnet all expect .safetensors files by default, and any "Load" node in a workflow — Load Checkpoint, Load LoRA, Load VAE — will show a dropdown of the .safetensors files sitting in that folder.

Quick Example

flux1-dev.safetensors is the main Flux.1 Dev checkpoint file, and it's a safetensors file like nearly everything else you'll download from Hugging Face or Civitai today.

If a download page only offers a .ckpt or .pt file, check whether the same repository also has a .safetensors version — most popular models do, and it's the safer, faster choice.

Common Mix-Up

.safetensors vs. .ckpt: both can store the exact same model weights. The difference is entirely about how the file is read — .ckpt relies on Python's pickle format and can run code on load, while .safetensors stores raw tensors only and cannot.

Frequently Asked Questions

Yes. A .safetensors file stores only tensor data, so opening it can’t run arbitrary code. Older .ckpt files use Python’s pickle format, which can execute hidden code the moment the file loads.

Yes, several community scripts and ComfyUI Manager extensions can convert .ckpt checkpoints to .safetensors. It’s worth doing for any model you plan to keep using regularly.

Yes — checkpoints, LoRAs, VAEs, CLIP models, and ControlNet models are all commonly distributed as .safetensors files. It’s a general-purpose tensor storage format, not tied to one model architecture.

See It In Action

Ready to install your first models?

Our install guide walks through downloading and placing checkpoints, LoRAs, and VAEs correctly.

Published: 2026-09-04 · Last updated: 2026-09-04

Discussion

Join the discussion

Sign in to leave a comment or reply

💬

No comments yet

Be the first to share your thoughts!