Stable Diffusion UI: How to Change Your Model Directory (Practical Guide)
By Nina Torres, Tool Reviewer
If you’re using Stable Diffusion, especially a UI like Automatic1111 or ComfyUI, you know how quickly your model collection can grow. Checkpoints, LoRAs, VAEs, Textual Inversions – they all take up significant space. Managing these files effectively is crucial for performance and organization. This guide will walk you through the practical steps to **change your Stable Diffusion UI model directory**, making your workflow smoother and your storage happier.
We’ll cover why you might want to do this, the common methods for different UIs, and some best practices. This isn’t just about moving files; it’s about optimizing your Stable Diffusion experience.
Why Change Your Stable Diffusion UI Model Directory?
There are several compelling reasons to consider modifying where your Stable Diffusion UI looks for models:
* **Limited Drive Space:** Your primary drive (C: drive on Windows) might be running low on space. Models can easily consume hundreds of gigabytes. Moving them to a larger secondary drive (D:, E:, etc.) is a common solution.
* **Faster Storage:** You might have a dedicated, faster SSD for your Stable Diffusion models, while your main OS drive is a slower HDD or a smaller SSD. Performance can improve significantly with faster model loading.
* **Organization and Cleanup:** Keeping your Stable Diffusion installation directory lean can make backups easier and reduce clutter. Separating models into their own dedicated folder structure can improve organization.
* **Shared Models:** If you run multiple Stable Diffusion UIs (e.g., Automatic1111 and ComfyUI) or different installations, you might want them to share the same model repository to avoid duplicating files.
* **Network Storage:** In some advanced setups, users might want to store models on a network-attached storage (NAS) device for accessibility or centralized management.
Understanding these reasons helps you decide if changing your Stable Diffusion UI model directory is the right move for your setup.
Understanding Model Types and Their Default Locations
Before we change anything, let’s quickly review the main types of models and where they typically reside within a default Automatic1111 installation (as it’s one of the most popular UIs). ComfyUI has a similar structure, often under a `models` subfolder.
* **Checkpoints (Safetensors/CKPT):** These are the core models that generate images. They are large.
* *Default Location:* `stable-diffusion-webui/models/Stable-diffusion/`
* **LoRAs:** Smaller, fine-tuning models.
* *Default Location:* `stable-diffusion-webui/models/Lora/`
* **VAEs (Variational Autoencoders):** Used for better image decoding and color.
* *Default Location:* `stable-diffusion-webui/models/VAE/`
* **Textual Inversions (Embeddings):** Small files that teach the model new concepts or styles.
* *Default Location:* `stable-diffusion-webui/embeddings/` (Note: This is often a separate folder, not directly under `models/`)
* **Hypernetworks:** Another type of fine-tuning model, less common now.
* *Default Location:* `stable-diffusion-webui/models/Hypernetworks/`
* **ControlNet Models:** Specific models for the ControlNet extension.
* *Default Location:* `stable-diffusion-webui/extensions/sd-webui-controlnet/models/` (This one is often within the extension’s folder)
Knowing these default paths is important for planning your new directory structure. When you **change your Stable Diffusion UI model directory**, you’ll likely be moving most of these.
Method 1: Using Command-Line Arguments (Automatic1111)
This is the most common and recommended way to **change your Stable Diffusion UI model directory** for Automatic1111. It’s flexible and allows precise control.
Step 1: Create Your New Model Directory Structure
First, decide where you want your models to live. Let’s say you want them on your D: drive in a folder named `D:\StableDiffusionModels`.
Inside `D:\StableDiffusionModels`, recreate the necessary subfolders:
* `D:\StableDiffusionModels\Stable-diffusion\` (for checkpoints)
* `D:\StableDiffusionModels\Lora\`
* `D:\StableDiffusionModels\VAE\`
* `D:\StableDiffusionModels\Hypernetworks\`
* `D:\StableDiffusionModels\embeddings\` (for textual inversions – note the different name)
You don’t need to create folders for types you don’t use.
Step 2: Move Your Existing Models
Now, carefully move your existing models from their default locations to their new corresponding folders.
For example:
* Move all `.safetensors` and `.ckpt` files from `stable-diffusion-webui/models/Stable-diffusion/` to `D:\StableDiffusionModels\Stable-diffusion/`.
* Move all LoRA files from `stable-diffusion-webui/models/Lora/` to `D:\StableDiffusionModels\Lora/`.
* And so on for VAEs, Hypernetworks, and embeddings.
**Important:** Do not move the `stable-diffusion-webui` folder itself. Only move the *contents* of the model subfolders.
Step 3: Modify `webui-user.bat`
This is where you tell Automatic1111 where to look.
1. Navigate to your `stable-diffusion-webui` installation directory.
2. Find and open `webui-user.bat` with a text editor (like Notepad, Notepad++, VS Code).
3. Locate the line that starts with `set COMMANDLINE_ARGS=`.
4. Add the following arguments to this line, replacing the example paths with your actual paths:
“`batch
set COMMANDLINE_ARGS= –ckpt-dir “D:\StableDiffusionModels\Stable-diffusion” –lora-dir “D:\StableDiffusionModels\Lora” –vae-dir “D:\StableDiffusionModels\VAE” –hypernetwork-dir “D:\StableDiffusionModels\Hypernetworks” –embeddings-dir “D:\StableDiffusionModels\embeddings”
“`
**Notes:**
* Make sure to include the double quotes around your paths, especially if they contain spaces.
* If you don’t use a certain model type (e.g., Hypernetworks), you can omit that argument.
* If you already have other arguments in `COMMANDLINE_ARGS`, just add these new ones after a space. For example: `set COMMANDLINE_ARGS= –xformers –ckpt-dir “D:\StableDiffusionModels\Stable-diffusion”`
* There isn’t a direct argument for a general `models` folder. You specify each type individually. This is why recreating the subfolder structure is important.
5. Save the `webui-user.bat` file.
Step 4: Test Your Setup
Run `webui-user.bat`. Automatic1111 should start up as usual. Go to the “Stable Diffusion checkpoint” dropdown in the UI. You should see all your models listed. If they are, you’ve successfully managed to **change your Stable Diffusion UI model directory**.
**Troubleshooting:**
* If models are missing, double-check your paths in `webui-user.bat` for typos or incorrect drive letters.
* Ensure the model files are actually in the specified new directories.
* Make sure you didn’t accidentally move the entire `models` folder instead of its contents.
Method 2: Symlinks (Symbolic Links) – Advanced Option
Symlinks are like advanced shortcuts. They trick the operating system into thinking a folder is in one place, while its actual contents are elsewhere. This is a powerful way to **change your Stable Diffusion UI model directory** without modifying the UI’s configuration directly, making it useful for UIs that don’t offer direct path modification.
**When to use Symlinks:**
* You want to keep the UI’s internal structure untouched.
* You need to move the `embeddings` folder or other specific subfolders that might not have a direct command-line argument.
* You’re comfortable with the command line.
Step 1: Create Your New Model Directory
Just like before, decide on your new location. For example, `D:\MyNewModelStorage`.
Step 2: Move the Original Model Folder
Let’s say you want to move your `Stable-diffusion` checkpoint folder.
1. Close Stable Diffusion UI.
2. Navigate to `stable-diffusion-webui/models/`.
3. Move the entire `Stable-diffusion` folder to your new location: `D:\MyNewModelStorage\Stable-diffusion`.
*After this, the `stable-diffusion-webui/models/Stable-diffusion/` path will no longer exist.*
Step 3: Create the Symbolic Link
1. Open Command Prompt or PowerShell **as an administrator**. This is crucial.
2. Use the `mklink` command. The syntax is `mklink /D “link_path” “target_path”`.
* `link_path`: The original location where the UI expects the folder to be.
* `target_path`: The new location where the folder actually resides.
For our checkpoint example, you would type:
“`cmd
mklink /D “C:\path\to\stable-diffusion-webui\models\Stable-diffusion” “D:\MyNewModelStorage\Stable-diffusion”
“`
Replace `C:\path\to\stable-diffusion-webui` with your actual installation path.
You’ll see a message like “symbolic link created for C:\path\to\stable-diffusion-webui\models\Stable-diffusion <<===>> D:\MyNewModelStorage\Stable-diffusion”.
3. Repeat this process for other model subfolders (`Lora`, `VAE`, `embeddings`, etc.) if you want to move them using symlinks.
Example for LoRA:
“`cmd
mklink /D “C:\path\to\stable-diffusion-webui\models\Lora” “D:\MyNewModelStorage\Lora”
“`
Example for embeddings (which is often directly under the main UI folder):
“`cmd
mklink /D “C:\path\to\stable-diffusion-webui\embeddings” “D:\MyNewModelStorage\embeddings”
“`
Step 4: Test Your Setup
Run your Stable Diffusion UI. It should detect the models as if they were in their original locations. This method effectively helps you **change your Stable Diffusion UI model directory** without needing specific UI arguments for every model type.
**Cautions with Symlinks:**
* Requires administrator privileges to create.
* If you delete the symlink, the original files are safe. If you delete the *target* folder, the original files are gone. Be careful.
* Backups need to consider symlinks if you want to back up the actual model files.
Method 3: ComfyUI and `extra_model_paths.yaml`
ComfyUI offers a very clean and explicit way to manage model paths using a configuration file. This is often the preferred method for ComfyUI users to **change their Stable Diffusion UI model directory**.
Step 1: Create Your New Model Directory Structure
Similar to Automatic1111, plan and create your new model folders. For example:
* `D:\ComfyUI_Models\`
* `D:\ComfyUI_Models\checkpoints\`
* `D:\ComfyUI_Models\loras\`
* `D:\ComfyUI_Models\vae\`
* `D:\ComfyUI_Models\embeddings\`
Step 2: Move Your Existing Models
Move your models from ComfyUI’s default `ComfyUI/models/` subfolders to your new locations.
For example:
* `ComfyUI/models/checkpoints/` -> `D:\ComfyUI_Models\checkpoints\`
* `ComfyUI/models/loras/` -> `D:\ComfyUI_Models\loras\`
* And so on.
Step 3: Modify `extra_model_paths.yaml`
1. Navigate to your ComfyUI installation directory.
2. Look for a file named `extra_model_paths.yaml.example`.
3. Rename this file to `extra_model_paths.yaml`. (Remove the `.example` extension).
4. Open `extra_model_paths.yaml` with a text editor.
5. You’ll see commented-out examples. Uncomment or add new entries for your custom paths. The structure is YAML, so indentation is important.
Here’s an example of how to add your new paths:
“`yaml
# This file can be used to add additional paths for models
# The paths will be checked in the order they are listed.
# The first path found will be used.
# Example for adding an extra path for checkpoints:
# checkpoints:
# – “D:/ComfyUI_Models/checkpoints” # Windows path
# – “/mnt/models/checkpoints” # Linux path
# Example for adding an extra path for loras:
# loras:
# – “D:/ComfyUI_Models/loras”
# Example for adding an extra path for vae:
# vae:
# – “D:/ComfyUI_Models/vae”
# Example for adding an extra path for embeddings:
# embeddings:
# – “D:/ComfyUI_Models/embeddings”
# My Custom Paths:
checkpoints:
– “D:\ComfyUI_Models\checkpoints”
loras:
– “D:\ComfyUI_Models\loras”
vae:
– “D:\ComfyUI_Models\vae”
embeddings:
– “D:\ComfyUI_Models\embeddings”
“`
**Notes:**
* Use forward slashes (`/`) or double backslashes (`\\`) in paths for consistency, though single backslashes (`\`) often work on Windows.
* You can list multiple paths for each model type. ComfyUI will check them in order.
* Ensure the indentation is correct (spaces, not tabs, typically).
6. Save the `extra_model_paths.yaml` file.
Step 4: Test Your Setup
Start ComfyUI. Load a workflow, and your models should be available in the dropdown lists. This method provides a clear and organized way to **change your Stable Diffusion UI model directory** for ComfyUI.
Best Practices for Model Directory Management
Regardless of the method you choose to **change your Stable Diffusion UI model directory**, here are some general tips:
* **Plan Your Structure:** Before you start moving files, decide on a logical folder structure for your new model directory. Group by type, or even by purpose (e.g., “SDXL Models”, “SD1.5 Models”).
* **Backup First:** Always, always back up your important model files before making major changes. You can copy them to a temporary location.
* **Keep Original Structure:** When creating new folders, try to mimic the original UI’s subfolder structure (e.g., `Stable-diffusion`, `Lora`, `VAE`). This makes it easier for the UI to find things.
* **Dedicated Drive:** If possible, use a dedicated SSD for your Stable Diffusion models. This will significantly improve loading times.
* **Regular Cleanup:** Periodically review your model folders. Delete models you no longer use. Large models take up a lot of space.
* **Version Control (Optional):** For those who are really serious, consider using a tool like Git LFS for version controlling your models, especially if you’re experimenting a lot.
* **Check for Duplicates:** Tools like Duplicate File Finder can help you identify and remove duplicate models if you accidentally copied them multiple times.
* **Update Shortcuts:** If you have desktop shortcuts that point to specific model files, remember to update them if you moved the files.
By following these practices, you’ll maintain an efficient and organized Stable Diffusion environment, making it easier to manage your ever-growing collection of generative AI models.
FAQ: Stable Diffusion UI Change Model Directory
**Q1: After changing my model directory, some models are missing. What should I check?**
A1: First, double-check the paths you entered in your `webui-user.bat` file (for Automatic1111) or `extra_model_paths.yaml` (for ComfyUI). Look for typos, incorrect drive letters, or missing quotes around paths. Second, verify that the actual model files are indeed present in the new directories you specified. Also, ensure you’ve recreated the correct subfolder structure (e.g., `Stable-diffusion`, `Lora`) within your new main model directory.
**Q2: Can I have models in both the old default directory and the new custom directory?**
A2: Yes, generally. When you **change your Stable Diffusion UI model directory** using command-line arguments (Automatic1111) or `extra_model_paths.yaml` (ComfyUI), you are adding *additional* locations for the UI to search. The UI will typically check its default locations first, then the custom ones. This can be useful if you only want to move some models, or if you have a few core models you prefer to keep in the default spot. However, for better organization and to avoid confusion, it’s usually best to consolidate your models into the new custom directory.
**Q3: How do I move ControlNet models specifically?**
A3: ControlNet models are often treated slightly differently because they reside within the ControlNet extension’s folder. For Automatic1111, the `webui-user.bat` method can use the `–controlnet-dir` argument. You’d move your ControlNet models (e.g., `control_v11p_sd15_canny.pth`) from `stable-diffusion-webui/extensions/sd-webui-controlnet/models/` to your new chosen directory (e.g., `D:\MyControlNetModels`) and then add `–controlnet-dir “D:\MyControlNetModels”` to your `COMMANDLINE_ARGS`. For ComfyUI, you can add a `controlnet` entry to your `extra_model_paths.yaml` file pointing to your new ControlNet model location.
**Q4: Is it safe to delete the original model folders after moving everything?**
A4: Yes, once you have confirmed that your Stable Diffusion UI is correctly loading models from the new directory, it is safe to delete the old, empty model folders from your original Stable Diffusion installation. This helps free up space and keeps your installation clean. However, always double-check your UI is working perfectly first. If you used symlinks, remember that deleting the symlink itself is safe, but deleting the *target folder* that the symlink points to will delete your actual models.
🕒 Last updated: · Originally published: March 15, 2026