Stable Diffusion Model Failed to Load, Exiting [Error Fix]

Changing your configuration and updating drivers usually helps

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

fix Stable Diffusion model failed to load, exiting in Windows

Many reported Stable Diffusion failed to load the model message while trying to use this tool, and if this happens, you won’t be able to generate anything at all. Luckily, there are several solutions available.

Why do I get Stable Diffusion model failed to load?

This issue can occur due to insufficient memory or an outdated graphics card driver. Corrupt cache or missing permissions can also cause this problem.

How do I fix error Stable Diffusion model failed to load, exiting?

Before trying anything else, restart the PC and ensure you have a stable Internet connection. You can also try running Stable Diffusion as an administrator.

1. Edit the webui-user.bat file

  1. Locate the webui-user.bat file, right-click on it, and select Open.batch file to fix Stable Diffusion model failed to load, exiting
  2. Now, enter the the following argument in the batch file:--disable-safe-unpickle
  3. It should finally look like this:

@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--disable-safe-unpickle
call webui.bat

2. Update the graphics driver

  1. Press Windows + X to open the Power User menu, and select Device Manager from the list.device manager
  2. Expand the Display adapters entry, right-click on the graphics adapter, and select Update driver.update driver to fix Stable Diffusion model failed to load, exiting
  3. Choose Search automatically for drivers and wait for Windows to install the best one available on the PC.search automatically
  4. 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:

As a final but quicker solution, you can ensure graphics drivers are always up to date with the help of professional driver updating software, such as PC HelpSoft Driver Updater. This tool will scan your system and automatically download updated drivers for all your components.

⇒ Get PC HelpSoft Driver Updater

3. Increase the Virtual Memory

  1. Press Windows + S to open Search, type View advanced system settings, and click on the relevant search result.view advanced system settings
  2. Click on Settings under Performance.settings
  3. Navigate to the Advanced tab, and click on Change under Virtual memory.change to fix Stable Diffusion model failed to load, exiting
  4. Untick the checkbox for Automatically manage paging file size for all drives, select the No paging file option, and click Set.no paging file
  5. Click Yes in the confirmation prompt.
  6. Now, select Custom size, fill out the fields using the following formula based on the available RAM and click Set:
    • Initial size: 1.5 x Available RAM (in GBs) x 1024
    • Maximum size: 3 x Available RAM (in GBs) x 1024change virtual memory to fix Stable Diffusion model failed to load, exiting
  7. In our case, the installed RAM was 12 GB, so the value became 12288 MB and 24576 MB.
  8. Once done, click on OK to save the changes.

4. Remove the huggingface folder

  1. 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\huggingfacepath
  2. Press Ctrl + A to select all the files, and hit Delete to clear them.
  3. Restart the computer when done and check if the error is fixed.

5. Delete Python and pip folders

  1. Press Windows + R to open Run, paste the following path, and hit Enter:%appdata%appdate
  2. Locate any folders related to Python or pip, and delete them.
  3. Also, check for cache in Temporary Files and remove it.

6. Perform a system restore

  1. Press Windows + R to open Run, type rstrui.exe in the text field, and hit Enter.rstrui.exe
  2. Select Choose a different restore point option, if available, and click Next.restore point to fix Stable Diffusion model failed to load, exiting
  3. Pick another restore point from the list, preferably the oldest one, and click Next.restore point
  4. Verify the details and click on Finish to start the restore process.system restore to fix Stable Diffusion model failed to load, exiting

Before you leave, check some quick tips to make Windows faster and get a better experience, in addition to eliminating such performance-related issues.

This is a great AI art generator software, but as you can see, it has its share of issues. If you were unable to fix the issue, you might want to use Bing AI to create images instead.

If you decide to do so, keep in mind that you might encounter Image Creator is not available in your region.

For any queries or to share what worked for you, drop a comment below.

More about the topics: AI, photo software