Running Stable Diffusion Forge locally on a PC without a GPU

This article can be read in about 3 minutes.
PR

The purpose 


Stable Diffusion Forge typically requires an NVIDIA GPU (like a GeForce card) to run. Here, we’ll explain how to get Stable Diffusion Forge working on a PC that doesn’t have an NVIDIA GPU, using only the CPU.

PR

Environment Setup

Download

Open following page

GitHub - lllyasviel/stable-diffusion-webui-forge
Contribute to lllyasviel/stable-diffusion-webui-forge development by creating an account on GitHub.

Scroll down the page to find the “Installing Forge” section, then click on the recommended binary to download it.

Extract


Extract the downloaded ZIP file to your desired folder.

Modify bat


Open the following file with an editor like Notepad.

webui¥webui-user.bat

You will modify the following line:

set COMMANDLINE_ARGS=

After

set COMMANDLINE_ARGS=--always-cpu  --skip-torch-cuda-test  --no-half --opt-sub-quad-attention --upcast-sampling --opt-sdp-attention

That completes the environment setup.


--always-cpu and --skip-torch-cuda-test are essential, but feel free to adjust the other arguments as needed.

Install model


It appears that stable-diffusion-webui-forge doesn’t come with models installed by default. Please refer to the following guide to install the models.

PR

Execute

Run run.bat located inside the extracted folder.


If you see the following error during execution (the process will continue), run the displayed git config~ command. This error might appear repeatedly; if it does, run the command again (the folder path in the arguments should have changed).


If your browser launches and displays the GUI as shown below, the setup is successful!

PR

Result


You successfully created an image by entering a prompt into the displayed GUI and clicking Generate.

comment

Copied title and URL