Stable Diffusion Model Failed to Load, Exiting [Error Fix]
Check our verified solutions to get rid the error
- The Stable Diffusion model failed to load, exiting error is usually arises due to low RAM availability, corrupt cache, or outdated drivers.
- A quick fix is to edit the webui-user.bat file.
- For many users, increasing the VRAM (Virtual RAM) did the trick.
Stable Diffusion, is, undoubtedly, one of the simplest AI image generator tools available out there. It’s quick, straightforward, and doesn’t need many additional resources. But many who tried it reported seeing the Stable Diffusion model failed to load, exiting error.
The problem has been reported by many, but there are no viable solutions, given the underlying cause is different for each user. But there are a few changes that could get things up and running when Stable Diffusion is loading forever. Keep reading to find out!
Why do I get Stable Diffusion model failed to load?
Here are a few reasons users come across the issue:
- Insufficient RAM: Stable Diffusion requires 6-8 GB of VRAM, which when not available, can lead to issues generating images. In this case, you will have to increase the Virtual Memory.
- Outdated graphics driver: In some cases, it was an outdated driver, primarily the one for graphics, that triggered the error.
- Corrupt cache: For a few users, the app cache, too, could be the underlying cause behind the Stable Diffusion model failed to load, exiting error.
- Missing permissions: Stable Diffusion needs certain permissions, some of which are only available under administrative privileges. And if these are missing, you will come across issues.
How do I fix error Stable Diffusion model failed to load, exiting?
Before we move to the slightly complex solutions, here are a few quick ones:
- Restart the computer.
- Configure Stable Diffusion to run with administrative privileges, in case the required permissions are missing.
- Make sure you have a stable connection, and that the Internet speed is fast.
If none work, move to the fixes listed next.
1. Edit the webui-user.bat file
- Locate the webui-user.bat file, right-click on it, and select Open.
- Now, enter the the following argument in the batch file:
--disable-safe-unpickle
- It should finally look like this:
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--disable-safe-unpickle
call webui.bat
A quick fix that works for most users when encountering, Stable Diffusion model failed to load, exiting, is to modify the webui-user.bat file and adding the –disable-safe-unpickle agreement to it.
2. Update the graphics driver
- Press Windows + X to open the Power User menu, and select Device Manager from the list.
- Expand the Display adapters entry, right-click on the graphics adapter, and select Update driver.
- Choose Search automatically for drivers and wait for Windows to install the best one available on the PC.
- Once done, restart the computer for the changes to apply.
An up-to-date graphics driver, including Stable Diffusion, is critical for running resource-intensive apps. So, it’s vital that you update the graphics driver when facing issues.
Also, sometimes, an update may not be available locally, and you will have to visit the manufacturer’s website to manually install the latest driver version. Here are the direct links:
3. Increase the Virtual Memory
- Press Windows + S to open Search, type View advanced system settings, and click on the relevant search result.
- Click on Settings under Performance.
- Navigate to the Advanced tab, and click on Change under Virtual memory.
- Untick the checkbox for Automatically manage paging file size for all drives, select the No paging file option, and click Set.
- Click Yes in the confirmation prompt.
- Now, select Custom size, fill out the fields using the following formula based on the available RAM and click Set:
- In our case, the installed RAM was 12 GB, so the value became 12288 MB and 24576 MB.
- Once done, click on OK to save the changes.
In some cases, users reported the Stable Diffusion model failed to load, exiting Cuda out of memory error due to high RAM consumption. So you will need to increase the Virtual Memory (VRAM).
4. Remove the huggingface folder
- Press Windows + E to open File Explorer, paste the following path in the address bar while replacing Username with the active user, and hit Enter:
C:\Users\Username\.cache\huggingface
- Press Ctrl + A to select all the files, and hit Delete to clear them.
- Restart the computer when done and check if the error is fixed.
5. Delete Python and pip folders
- Press Windows + R to open Run, paste the following path, and hit Enter:
%appdata%
- Locate any folders related to Python or pip, and delete them.
- Also, check for cache in Temporary Files and remove it.
6. Perform a system restore
- Press Windows + R to open Run, type rstrui.exe in the text field, and hit Enter.
- Select Choose a different restore point option, if available, and click Next.
- Pick another restore point from the list, preferably the oldest one, and click Next.
- Verify the details and click on Finish to start the restore process.
When nothing else helps get rid of error, Stable Diffusion model failed to load, exiting, performing a system restore should help. The process reverts your PC to a previous state, so select a restore point created before the error first appeared.
Before you leave, check some quick tips to make Windows faster and get a better experience, in addition to eliminating such performance-related issues.
For any queries or to share what worked for you, drop a comment below.
Still having issues? Fix them with this tool:
SPONSORED
Some driver-related issues can be solved faster by using a dedicated tool. If you're still having problems with your drivers, just download DriverFix and get it up and running in a few clicks. After that, let it take over and fix all of your errors in no time!