If you’ve ever downloaded a Stable Diffusion model and thought, What’s the deal with all these file types and cryptic filenames?, you’re not alone. Between .safetensors, .ckpt, .vae, and terms like pruned, json, and yaml, it can feel like a secret code. And if you’re rocking a Mac with Apple Silicon, you’ve probably wondered how all this fits into your setup.
Let’s demystify these file types and filenames, break down their uses, and empower you to navigate your AI art journey with confidence.
File Extensions: The Key Players
.safetensors
- What It Is: A secure, optimized format for storing model weights. Designed to prevent malicious code injection,
.safetensorshas quickly become the gold standard for safety and efficiency. - Why You Want It: If you’re downloading models from the internet,
.safetensorsprotects your system while loading faster in tools like ComfyUI. - Use Case: Base models, LoRAs, and embeddings.
- Example Filename:
cyberpunk_model.safetensors
.ckpt
- What It Is: A legacy file format used to store model checkpoints.
.ckptfiles are widely supported but lack the built-in safety of.safetensors. - Why It’s Still Around: Many older models use
.ckpt, and it’s compatible with nearly every Stable Diffusion tool. - Use Case: Legacy models or workflows.
- Example Filename:
classic_model.ckpt
VAE
- What It Is: Variational Autoencoder files refine your images by enhancing details, improving colors, and making outputs pop.
- Why It Matters: VAEs are optional but often necessary for achieving high-quality results, especially for models that require additional latent space optimization.
- Use Case: Paired with a base model to boost image quality.
- Example Filename:
highres_vae.safetensors
.pth
- What It Is: A PyTorch-specific file format used during training and fine-tuning. While common in machine learning workflows, you’ll likely encounter
.pthfiles when working with custom models or scripts. - Use Case: Training or fine-tuning models.
- Example Filename:
custom_model.pth
.py
- What It Is: Python script files that contain code to run, modify, or extend Stable Diffusion workflows.
- Why It’s Useful: Scripts like
generate.pyortrain.pycan automate complex tasks or introduce new features. - Use Case: Running or modifying workflows.
- Example Filename:
train_lora.py
.json
- What It Is: A lightweight, human-readable file format used for storing configuration data or sharing workflows.
- Why It’s Useful: In ComfyUI,
.jsonfiles store workflow setups, making it easy to save, load, and share configurations. - Use Case: Workflow files, model metadata.
- Example Filename:
workflow_config.json
.yaml
- What It Is: Another configuration file format, similar to
.jsonbut often more human-readable for complex setups. - Why It’s Useful: Many tools use
.yamlfiles to manage settings or dependencies, making it essential for advanced customization. - Use Case: Model configurations, dependency setups.
- Example Filename:
model_config.yaml
What Does “Pruned” Mean in Filenames?
Sometimes, you’ll see filenames with “pruned,” like model_pruned.ckpt. Here’s what that means:
- Pruned Models: These are models that have been stripped of unnecessary data (like training metadata) to reduce file size. They load faster and take up less storage but may lose some flexibility for advanced workflows.
- When to Use Them: If you’re focused on inference (generating images) and don’t need to fine-tune the model, pruned models are perfect.
- When to Avoid Them: If you’re planning to train or fine-tune a model, opt for the full version instead.
Precision Formats: fp8, fp16, fp32
Precision formats determine how numbers are stored during computation, directly affecting speed, memory usage, and image quality.
fp32 (32-bit Floating Point)
- The High-Detail Option: Provides maximum numerical precision for calculations.
- Best For: Training models or high-precision tasks.
- Downside: High VRAM usage (~10GB for most models).
- Apple Silicon Note: Likely overkill unless you have ample unified memory.
fp16 (16-bit Floating Point)
- The Sweet Spot: Balances quality with VRAM efficiency.
- Best For: Inference tasks, including most Stable Diffusion workflows.
- VRAM Usage: ~6GB for base models.
- Apple Silicon Note: Works well on M1/M2 Macs.
fp8 (8-bit Floating Point)
- The Lightweight Option: Uses minimal VRAM but sacrifices precision.
- Best For: Experimental setups or ultra-low-VRAM systems.
- Apple Silicon Note: Not widely supported yet but could become relevant with optimizations.
VRAM Requirements and Apple Silicon Tips
Base Models
- fp16: ~6GB VRAM for most workflows.
- fp32: ~10GB VRAM for detailed renders.
With LoRAs and VAEs
- Add 1–2GB VRAM overhead for each additional component.
Apple Silicon (M1/M2) Considerations
- Unified Memory: Shared between GPU and CPU, so total system RAM matters.
- Recommended Precision: Stick to fp16 for optimal performance.
- Metal Performance Shaders: Enable PyTorch compatibility but may require custom builds for some tools.
How to Choose the Right Files
- Start with
.safetensors- For security and performance, prioritize
.safetensorsover.ckpt. - Ideal for Apple Silicon setups where efficiency matters.
- For security and performance, prioritize
- Load a VAE
- If your outputs look dull or lack detail, pair your model with a
.vaefile.
- If your outputs look dull or lack detail, pair your model with a
- Use Pruned Models for Inference
- If you’re not planning to train or fine-tune, pruned models save space and load faster.
- Optimize Precision
- Stick to fp16 for most workflows unless you have specific needs for fp32 or experimental use cases with fp8.
File Type Cheat Sheet
File Type
Purpose
Use Case
.safetensors
Secure model weights
Base models, LoRAs, VAEs
.ckpt
General-purpose model checkpoints
Legacy models, older workflows
.vae
Variational Autoencoder
Enhancing image quality
.pth
PyTorch model weights
Training or custom workflows
.py
Python scripts
Running or customizing workflows
.json
Configuration files
Workflow setups, metadata
.yaml
Configuration files
Model configurations
Final Thoughts: File Mastery Made Easy
Understanding Stable Diffusion’s file types, precision formats, and cryptic filenames isn’t just for techies—it’s your gateway to unlocking creative control. Whether you’re running on a beastly GPU or a sleek Apple Silicon Mac, knowing what files to use and how to optimize them ensures your AI art journey is smooth and efficient.
So, next time you see a filename like futuristic_model_pruned_fp16.safetensors, you’ll know exactly what it means—and how to make it work for you. Happy creating!
