Sign In

Forge Neo on Linux

1

Forge Neo on Linux

Introduction

For the last two weeks (or at least last week) it has been really warm where I live. Especially last weekend has been the hottest weekend since 145 years (begin of recording weather data), breaking the temperature record three times in three days. Since I did not want to warm up my place even more by letting my pc run for half the day, I booted up my (old) laptop with Linux to see if I can get Forge Neo running on it and do some image generation.
Long story short, it worked, the cover image of the article was generated with my laptop using Anima. However it is really slow compared to what I am used from my pc. My laptop only has a Nvidia Quadro M1200 4GB GPU with compute capability (CC) 5.0 and no CUDA cores, which probably is the reason it generates so slow, since I used quantized model versions that fit on my GPU memory.
In the following I provide a step by step guide to install Forge Neo on Linux based on my experience. This time I am using command line for installation, but you also could use Stability Matrix or some other install helper (I wrote an installation guide using Stability Matrix on windows). If you want to try it yourself and have an old Nvidia GPU with compute capability lower than 7.5 you should read the guide in total before starting installation. That way you can skip the step where I had to uninstall the latest pytorch version and install an older version (that works with outdated CC).

Install most recent GPU driver

Before you start the installation, you should check if your GPU driver supports the most recent CUDA version. This is assuming you have an Nvidia GPU and you are using a Nvidia driver for it. You can check the driver version by opening a terminal and using the command “nvidia-smi”.

00_check_driver_censored.jpg


Along with other information it will show you the driver version and the supported CUDA version. If you want to install Forge Neo with the default settings (default pytorch version) you need to have a driver supporting CUDA 13.0. If you have an older GPU with compute capability lower than 7.5 CUDA 12.6 support will be sufficient. The CC of more recent Nividia GPUs can be found on this table and the legacy CC for older GPUs on this table (I don’t know why they did not put this on just one page).
The best way to get a list of available nvidia driver versions and install the driver for your GPU depends on your distribution. Consult the wiki of your distribution or look into the driver-installation-guide by nvidia. For Ubuntu you can use “sudo ubuntu-drivers list” to get a list of available nvidia drivers and “sudo ubuntu-drivers install nvidia:###” where you replace ### with the driver number to install a specific driver version.

01_nvidia_driver_install_censored.jpg


For using pytorch with CUDA 12.6 you need at least have driver version 525 installed, for CUDA 13.0 you need to have at least version 580 (see this source).

Install git and uv

You need to have git installed in order to install Forge Neo. It is a software and repository management system that is widely used and the system driving github. See the install page on the git website for the install command for your preferred distribution. For ubuntu the command is “apt-get install git” or rather “sudo apt-get install git”.
Also for easily setting up a virtual environment you need to install uv. See the install page of uv for the best method for you.

Clone the Forge Neo repository

In order to run Forge Neo you need to download or “clone” the Forge Neo repository from github. Open a terminal and use the command “git clone https://github.com/Haoming02/sd-webui-forge-classic sd-webui-forge-neo --branch neo” to do this.

02_clone_repo_censored.jpg

Set up virtual environment

After you have cloned the repository, you need to set up the virtual environment for python in which the application will run. Therefore change into the Forge Neo directory by using the command “cd sd-webui-forge-neo”. If you have uv installed, you can now set up the virtual environment with the command “uv venv venv –python 3.13 –seed”.

03_setup_venv_censored.jpg

Install requirements

In order to install the needed requirements from the launch scripts, you need to give permission to them. Use the commands “chmod +x ./webui.sh” and “chmod +x ./webui-user.sh” to do so. Now start the Forge Neo application by using the command “./webui-user.sh”. Alternatively you can left click on the “webui-user.sh” file and select “run as application” (or something similar).

04_first_launch_requirements_install_censored.jpg


On the first launch of Forge Neo the script will download and install all the needed requirements. This can take some time.

05_install_requirements_censored.jpg

Wrong pytorch version

As mentioned in the introduction, the default pytorch version installed by the launch script (torch-2.11.0+cu130) is not compatible with my old GPU. I got the following warning and was advised to install a pytorch version supporting CUDA 12.6.

06_cc_warning_censored.jpg

Uninstall pytorch 2.11

For uninstalling the wrong pytorch version, I first needed to open a terminal and switch to the forge install directory. Next I had to activate the virtual environemen using the command “source venv/bin/activate”.

07_activate_venv_censored.jpg


For uninstalling the installed torch version just use “pip uninstall torch torchvision torchaudio” and confirm the queries.

08_uninstall_torch_censored.jpg

Install correct torch version

For installing the correct pytorch version I used the command “pip install torch==2.10.0+cu126 torchvision==0.25.0+cu126 --extra-index-url https://download.pytorch.org/whl/cu126” with the virtual environment activated. This again takes some time.

09_install_correct_torch_censored.jpg


If you already know your GPU will not support torch 2.11.0+cu130 (because you have a GPU with CC <7.5), you should first install this pytorch version (torch 2.10) and after that run the launch file for the first time.

Launching the webui file now say that my pytorch version is outdated, but I can use Forge Neo with it just fine.

10_launch_dialogue_censored.jpg

Generating with Forge Neo

After launching the webui it opens in the browser.

11_webui.png


So what can I run on an old GPU with low VRAM?

As I mentioned above I used Anima to generate the cover image. With slightly over 4GB file size the bf16 version does not fit on my GPU. You can see in the screenshot that I choose an 8-bit gguf quantized version of anima I found here. With 2.24 GB it fits comfortably in 4GB VRAM with room for the memory needed for generation. The default anima text encoder is small enough and is offloaded after the prompt is encoded. I am also using the Qwen2D_VAE instead of the standard VAE, which is smaller and faster. For a 768x768 resolution image I get about 12 s/it generation speed with these model components and 20+ s/it for 1k resolution. Using a turbo lora I can generate an image at 768x768 with 8 steps in 90-100 seconds like this. Given the low resolution it’s not very fast, but if you just want to generate a cover image it’s sufficient.
I also tried to use Flux.2-Klein 4B. I found an nvfp4 quantized version of it (don’t know which model it was excactly, but you can find a version here) and used a 5-bit or 6-bit gguf version of the text encoder and a smaller VAE. At about 2.5 GB the nvfp4 version is almost as small as the anima Q8 model, but due to the higher parameter count the generation speed is about 40 s/it at 1k resolution. Given Klein 4B is a 4 step distilled model actual inference time is about the same as with anima using 8 steps and a turbo lora. However due to the larger text encoder, it takes much longer to encode the prompt with Klein, so that the overall generation time is significantly longer than with anima.
I did not try illustrious, since I do not know of a 4-bit quantized version of a good illustrious checkpoint and did not want to try quantizing myself.

00000-2433641182.png

(This was also generated with anima on my laptop)

Conclusion

In this guide I provided instructions for installing Stable Diffusion WebUI Forge Neo on a Linux OS system with Nvidia GPU using the command line. I also provided examples how to run recent image generation models with Forge Neo on a low VRAM GPU.

1