-
Notifications
You must be signed in to change notification settings - Fork 1
Webui Installation Guides
- Automatic1111 with ZLUDA
- Automatic1111 with DirectML
- Comfyui with ZLUDA
- Comfyui with DirectML
- SwarmUI with ZLUDA
- SwarmUI with DirectML
- Fooocus with ZLUDA
- Fooocus with DirectML
- SD.Next with ZLUDA (soon)
- AMD Shark Studio (Currently Broken)
- Forge-Webui with ZLUDA
Troubleshooting Tips before opening an Issue.
DirectML: Its Microsofts backend for Machine Learning (ML) on Windows. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers, including all DirectX 12-capable GPUs.
Its slow and uses a lot of VRAM Resources but it works on any AMD GPU and even IGPUs.
It can be tuned in performance by using Tools such as MS Olive and ONNX. But this requires Model conversion and a limited feature set.
GPUs Supported by DirectML: Nearly every AMD GPU and IGPU.
ZLUDA: ZLUDA lets you run unmodified CUDA applications with near-native performance on AMD GPUs.
Its like an emulation layer to get Cuda tasks working on AMD GPUs on Windows or Linux.
Its faster and uses alot less VRAM compared to DirectML.
ZLUDA is the recommended Version for anyone with a supported card.
GPUs Supported by ZLUDA in this Guide:
(gfx1035) - AMD 680M-APU
(gfx1103) - AMD 780M-APU
(gfx803) - RX 570, 580, 590 8GB,
(gfx900) - RX VEGA 56, Vega 64, (gfx906) Radeon Vii,
(gfx1012) - RX 5500, XT,
(gfx1010) - RX 5600, XT,
(gfx1010) - RX 5700, XT,
(gfx1032) - RX 6600, 6650, XT, S, M,
(gfx1031) - RX 6700, 6750, XT, S, M,
(gfx1030) - RX 6800, XT, S, M,
(gfx1030) - RX 6900, 6950, XT, S, M,
(gfx1102) - RX 7600, XT, S, M,
(gfx1101) - RX 7700, XT, S, M,
(gfx1101) - RX 7800, XT, M,
(gfx1100) - RX 7900, XTX, XT, GRE, M,
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Install Automatic1111 Webui for Nvidia GPUs on Windows
Check the Preparation
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
- You go into the folder you created in this case Ai, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
- Press enter and after its done you can close the cmd.
- Edit the webui-user.bat (right click, edit), At the line COMMANDLINE_ARGS= You add:
--xformers --no-half-vae
Add the following command there too depending on your GPU Vram. (Check Task Manager ->Performance ->GPU ->Dedicated GPU-Memory)
- +11GB: Nothing to add besides the already added.
-
8-11GB:
--medvram-sdxl
-
3-6GB:
--medvram
-
2GB:
--lowvram
-
GTX 16XX cards additional need:
--no-half
instead of--no-half-vae
- After editing, save and launch the webui-user.bat inside the stable-diffusion-webui folder.
After the Installation which can take a while, is done, the Webui will autolaunch in your Default Browser.
Download the latest ComfyUI build from here:
https://github.com/comfyanonymous/ComfyUI/releases/latest/download/ComfyUI_windows_portable_nvidia.7z
Unzip the File into a Folder and launch the run_nvidia_gpu.bat to start the installation and to start ComfyUI in general.
Getting ComfyUI-Manager:
- After the installation is done go into ComfyUI/custom_nodes folder
- Click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
- Press enter and after its done you can close the cmd.
- Relaunch the run_nvidia_gpu.bat
Linking Models, Loras, etc. from other Webui's or Folders to ComfyUI:
If you want to link all models from an other Webui you can do that by renaming the extra_model_paths.example.yaml
to extra_model_paths.yaml
Then right click the file and edit it with Notepad or Notepad++.
If you have Automatic1111 installed you only need to change the base_path
line like in my Example that links to the Auto1111 Webui:
base_path: C:\Ai\stable-diffusion-webui
Then relaunch the run_nvidia_gpu.bat
Install SwarmUI for Nvidia GPUs on Windows
Check the Preparation
Note: if you're on Windows 10, you may need to manually install DotNET 8 SDK first. (on Windows 11 this is automated).
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
- You go into the folder you created in this case Ai, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/mcmonkeyprojects/SwarmUI.git
- Press enter and after its done you can close the cmd.
- Go into the StableSwarmUI folder and run the launch-windows.bat
- It can take a while for the installation. The Ui should open in your Browser when its ready.
Linking Models, Loras, etc. from other Webui's or Folders to SwarmUI:
If you want to link all models from an other Webui you can do that by:
going into the SwarmUI\dlbackend\comfy\ComfyUI folder.
there rename the extra_model_paths.example.yaml
to extra_model_paths.yaml
Then right click the file and edit it with Notepad or Notepad++.
If you have Automatic1111 installed you only need to change the base_path line
like in my Example that links to my Auto1111 Webui:base_path: C:\AI\stable-diffusion-webui
Then relaunch the launch-windows.bat
Download the latest Forge-Webui build from here:
https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/download/latest/webui_forge_cu121_torch231.7z
Unzip the File into a Folder and launch the run.bat to start the installation and to start Forge-Webui.
To update, launch the update.bat.
ReForge (Community Fork):
https://github.com/Panchovix/stable-diffusion-webui-reForge
Old Forge Version:
https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/download/previous/webui_forge_cu121_torch21_f0017.7z
Linking Models, Loras, etc. from other Webui's or Folders to Forge:
If you want to link all models from an other Webui you can do that by editing the webui-user.bat like this where you set the A1111_HOME to the Path where your Automatic1111 is installed or where you store your models. Here is an example:
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=
@REM Uncomment following code to reference an existing A1111 checkout.
set A1111_HOME=C:/AI/stable-diffusion-webui
@REM
@REM set VENV_DIR=%A1111_HOME%/venv
set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^
--ckpt-dir %A1111_HOME%/models/Stable-diffusion ^
--hypernetwork-dir %A1111_HOME%/models/hypernetworks ^
--embeddings-dir %A1111_HOME%/embeddings ^
--vae-dir %A1111_HOME%/models/vae ^
--controlnet-dir %A1111_HOME%/models/controlnet ^
--lora-dir %A1111_HOME%/models/Lora
call webui.bat
Download the latest Fooocus build from here:
https://github.com/lllyasviel/Fooocus/releases/download/v2.5.0/Fooocus_win64_2-5-0.7z
Unzip the File into a Folder and launch the run.bat to start the installation and to start Fooocus in general.
There are also two Presets which can be launched by running run_anime.bat and run_realistic.bat
Install Automatic1111 on AMD Windows with Zluda:
For Advanced Users
GPUs Supported: AMD VEGA, Vii, APUs, RX5500XT, RX5600XT, 5700XT, RX 6600, 7700S and all above.
Requires AMD Adrenalin 24.1.1 Driver or newer.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Getting the Autoamatic1111 AMD Fork:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
Dont use the same if you had installed the DirectML webui before.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter. - Then you copy and paste this command:
git clone https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu && cd stable-diffusion-webui-amdgpu && git submodule init && git submodule update
- Press enter and after its done you can close the cmd.
- Edit the webui-user.bat (right click), At the line COMMANDLINE_ARGS= You add:
--use-zluda --update-check --skip-ort
- Optional: Move one 1.5 based model from your other existing webui into the models/stable-diffusion folder. Or skip this if you dont have one.
- Launch the webui-user.bat, you'll get an error. Just close and go with the next steps.
Setting up Zluda
IMPORTANT: If your GPU is higher/newer than a RX6800, then skip Step 3
If you have an an RX 580 move here: Guide for ROCm 5.7
-
Install AMD HIP SDK 6.1.2 from here: https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
Dont check the Pro Driver. -
Download the latest ZLUDA build for ROCm 6 as zip file from here: https://github.com/lshqqytiger/ZLUDA/releases/
Unzip as Folder and move it onto the C: Drive and rename the Folder to ZLUDA -
If your GPU is below a RX 6800, you need to do the following steps:
Check your GPUs GFX Version here: GPU GFX List
3.1 Download the corresponding .zip File for your GPUs GFX Version from here:
https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/tag/v0.6.1.2
For gfx900/906 - VEGA 56, 64 and Vii its this
3.2 Go intoC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
There copy and rename thelibrary
folder toold_library
3.3 Open the .zip file and drag and drop all files of thelibrary
folder into thelibrary
folder. Not into theold_library
folder.
If the zip contains a rocblas.dll, copy that into theC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
Important: Restart your PC after this Step before proceeding. -
Add the
C:\ZLUDA
folder and%HIP_PATH%bin
to your PATH in the System Variables. Like shown here:
https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows -
Launch the webui-user.bat. It will install everything and open in your default Browser.
Noteworthy: The first image generation can take from 15 up to 40 minutes. First time only.
Additional Step ONLY for RX580 Users:
Go into the stable-diffusion-webui-amdgpu folder and click in the explorer bar (not searchbar)
There Type cmd and hit enter and then run these three commands on by one:
venv\scripts\activate
pip uninstall torch torchvision torchaudio -y
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
If you want to link all models from an other Webui you can do that by adding --ckpt-dir "Path/to/models/stable-diffusion" --lora-dir "Path/to/models/lora" --controlnet-dir "..." --embeddings-dir "..."
to the webui-user.bat, at the line set COMMANDLINE_ARGS=
Install Automatic1111 Directml Fork on Windows:
GPUs Supported: Every AMD GPU and even AMD Integrated GPUs
DirectML is slower than Zluda and requires a lot more VRAM.
Important:
If you tried to install SD before and failed, do this:
open up a cmd and type
pip cache purge
to remove the nvidia stuff.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
- Make a new Folder on your drive (not on Desktop, downloads, documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
- You go into the folder you created in this case Ai, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu && cd stable-diffusion-webui-amdgpu && git submodule init && git submodule update
- Press enter and after its done you can close the cmd.
- Edit the webui-user.bat (right click), At the line COMMANDLINE_ARGS= You add:
--use-directml --medvram --opt-sub-quad-attention --opt-split-attention --no-half-vae --upcast-sampling
- If your GPU has only 8GB VRAM or less and you run into out of memory, you may need to change
--medvram
to--lowvram
.
-
RX 5xxx cards additional need:
--no-half
- After that save and launch the webui-user.bat inside the stable-diffusion-webui-ammdgpu folder.
The Installation can take a while and when its done, the Webui will autolaunch in your Default Browser.
For an nearly full automated install follow the Guide of PatientX Comfyui AMD Fork:
Its made for ROCm 5.7 and RX580 works with it.
https://github.com/patientx/ComfyUI-Zluda
If you have a AMD RX 6000 or 7000 Series and want ROCm 6.1 support follow my manual Guide below:
Install ComfyUI on AMD Windows with Zluda:
For Advanced Users
GPUs Supported: AMD VEGA, Vii, APUs, RX5600XT, 5700XT, RX 6600, 7700S and above.
Requires AMD Adrenalin 24.1.1 Driver or newer.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Getting ComfyUI Zluda Fork:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type cmd then press enter.
- Then you copy and paste this command:
git clone https://github.com/LeagueRaINi/ComfyUI.git && cd ComfyUI && git checkout nodes-cudnn-patch
- Press enter and after its done you can close the cmd. You should now have a ComfyUI folder. Press F5 to reload if its not visible.
- Download any Model from Civitai.com like for example Dreamshaper v8 and move it into ComfyUI/models/checkpoints.
You can also link your Existing models from other Webui's or Folders. For that checkout the Steps at the bottom.
Launching ComfyUI
Now we need to create a Launch File to easily install and start ComfyUI:
- To create the File first click the link below:
https://raw.githubusercontent.com/CS1o/Stable-Diffusion-Info/main/Resources/Start-ComfyUI.bat
- Then on the Site make a right click and select "Save Site as/under"
- Before Saving make sure to set the Filetype to All Files (.) then press Save.
- If it's still a .txt file, then you need to Enable the File Extensions in the File Explorer by clicking:
in Win10 View > File Name Extensions
in Win11 View > Show > File Name Extensions
Then rename the File and change the .txt to .bat
- Move the Start-ComfyUI.bat into the ComfyUI Folder.
- Launch the Start-Comfuyi.bat. It will now install everything needed and when it's done the Webui opens in your default Browser.
- Launching Comfyui wont work as Zluda is needed, so close everything and proceed with the next steps.
Setting up Zluda:
Important: If you already installed Automatic1111 Zluda Version with my Guide, you can jump directly to Step 5. of the Zluda setup.
IMPORTANT: If your GPU is higher/newer than a RX6800, then skip Step 3
-
Install AMD HIP SDK 6.1.2 from here: https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
Dont check the Pro Driver. -
Download the latest ZLUDA build for ROCm 6 as zip file from here: https://github.com/lshqqytiger/ZLUDA/releases/
Unzip as Folder and move it onto the C: Drive and rename the Folder to ZLUDA -
If your GPU is below a RX 6800, you need to do the following steps:
Check your GPUs GFX Version here: GPU GFX List
3.1 Download the corresponding .zip File for your GPUs GFX Version from here:
https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/tag/v0.6.1.2
For gfx900/906 - VEGA 56, 64 and Vii its this
3.2 Go intoC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
There copy and rename thelibrary
folder toold_library
3.3 Open the .zip file and drag and drop all files of thelibrary
folder into thelibrary
folder. Not into theold_library
folder.
If the zip contains a rocblas.dll, copy that into theC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
Important: Restart your PC after this Step before proceeding. -
Add the
C:\ZLUDA
folder and%HIP_PATH%bin
to your PATH in the System Variables. Like shown here:
https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows -
Go into the
C:\ZLUDA\
Folder.
There make copy of the cublas.dll and the cusparse.dll and nvrtc.dll repaste them inside the folder.
Rename the copies to cublas64_11.dll and cusparse64_11.dll and nvrtc64_112_0.dll
Copy these three files into ComfyUI\venv\Lib\site-packages\torch\lib and overwrite if asked. -
Launch the Start-Comfuyi.bat. The Webui opens in your default Browser and is ready to Generate!
Noteworthy: The first image generation can take from 15 up to 40 minutes. First time only.
If you get a NUMPY Error do the following:
Install the Comfyui-Manager from below, then Click on Manager > Click on Install PIP Packages > type numpy==1.26.4
> Click OK and restart the server as prompted.
If you get a security warning you have to go into ComfyUI/custom_nodes/Comfyui-Manager and there edit the config.ini.
Change the Security Level to Weak, then save and try install numpy again.
After that set the Security Level back to normal.
Additional Step ONLY for RX580 Users:
Go into the stable-diffusion-webui-amdgpu folder and click in the explorer bar (not searchbar)
There Type cmd and hit enter and then run these three commands on by one:
venv\scripts\activate
pip uninstall torch torchvision torchaudio -y
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
Then do Step 5 again. After that launch the Start-Comfuyi.bat again.
Getting ComfyUI-Manager:
- After the installation is done go into ComfyUI/custom_nodes folder
- Click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
- Press enter and after its done you can close the cmd.
- Relaunch the Start-ComfyUI.bat
Linking Models, Loras, etc. from other Webui's or Folders to ComfyUI:
If you want to link all models from an other Webui you can do that by renaming the extra_model_paths.example.yaml
to extra_model_paths.yaml
Then right click the file and edit it with Notepad or Notepad++.
If you have Automatic1111 installed you only need to change the base_path
line like in my Example that links to the Zluda Auto1111 Webui:
base_path: C:\SD-Zluda\stable-diffusion-webui-amdpgu
Then save and relaunch the Start-Comfyui.bat
Install ComfyUI with Directml on Windows:
GPUs Supported: Every AMD GPU and even AMD Integrated GPUs
DirectML is slower than Zluda and requires a lot more VRAM.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
- Make a new Folder on your drive (not on Desktop, downloads, documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
- You go into the folder you created in this case Ai, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/comfyanonymous/ComfyUI
- Press enter and after its done you can close the cmd.
Launching ComfyUI
Now we need to create a Launch File to easily install and start ComfyUI:
- To create the File first click the link below:
https://raw.githubusercontent.com/CS1o/Stable-Diffusion-Info/main/Resources/Start-ComfyUI-DirectML.bat
- Then on the Site make a right click and select "Save Site as/under"
- Before Saving make sure to set the Filetype to All Files (.) then press Save.
- If it's still a .txt file, then you need to Enable the File Extensions in the File Explorer by clicking:
in Win10 View > File Name Extensions
in Win11 View > Show > File Name Extensions
Then rename the File and change the .txt to .bat
- Move the Start-ComfyUI-DirectML.bat into the ComfyUI Folder.
- Launch the Start-ComfyUI-DirectML.bat. It will now install everything needed and when it's done the Webui opens in your default Browser.
Getting ComfyUI-Manager:
- After the installation is done go into ComfyUI/custom_nodes folder
- Click in the File Explorer bar (not searchbar) and type
cmd
then press enter.
- Then you copy and paste this command:
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
- Press enter and after its done you can close the cmd.
- Relaunch the Start-ComfyUI-DirectML.bat
Linking Models, Loras, etc. from other Webui's or Folders to ComfyUI:
If you want to link all models from an other Webui you can do that by renaming the extra_model_paths.example.yaml
to extra_model_paths.yaml
Then right click the file and edit it with Notepad or Notepad++.
If you have Automatic1111 installed you only need to change the base_path
line like in my Example that links to the Zluda Auto1111 Webui:
base_path: C:\SD-Zluda\stable-diffusion-webui-directml
Then save and relaunch the Start-Comfyui.bat
Install SwarmUI on AMD Windows with Zluda:
For Advanced Users
GPUs Supported: AMD VEGA, Vii, APUs, RX5600XT, 5700XT, RX 6600, 7700S and above.
Requires AMD Adrenalin 24.1.1 Driver or newer.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Install DotNET 8 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 (Make sure to get the SDK x64 for Windows)
Getting SwarmUI:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type cmd then press enter.
- Then you copy and paste this command:
git clone https://github.com/mcmonkeyprojects/SwarmUI
- Press enter and after its done you can close the cmd. You should now have a SwarmUI folder. Press F5 to reload if its not visible.
- Run the launch-windows.bat. It will open up in Browser. Click 1. Agree, 2. No, for Default install (not AMD). 3. Just Install.
- The installation can take a bit. After its done and launched in the browser, close the browser and the CMD.
- Download any Model from Civitai.com like for example Dreamshaper v8 and move it into SwarmUI/Models/Stable-Diffusion.
Setting up Comfyui with ZLUDA as backend for SwarmUI:
- For this you need to follow my [AMD] Comfyui with ZLUDA Guide.
- After you succesfully installed Comfyui with ZLUDA you need to go into the SwarmUI\dlbackend\comfy Folder. There delete the exsiting ComfyUI Folder and copy your new ComfyUI Folder into.
- When thats done you can launch the launch-windows.bat file in the SwarmUI Folder and your done.
Install SwarmUI on AMD Windows with DirectML:
GPUs Supported: Every AMD GPU and even AMD Integrated GPUs
DirectML is slower than Zluda and requires a lot more VRAM.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Install DotNET 8 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 (Make sure to get the SDK x64 for Windows)
Getting SwarmUI:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type cmd then press enter.
- Then you copy and paste this command:
git clone https://github.com/mcmonkeyprojects/SwarmUI
- Press enter and after its done you can close the cmd. You should now have a SwarmUI folder. Press F5 to reload if its not visible.
- Run the launch-windows.bat. It will open up in Browser. Click 1. Agree, 2. select Yes, for AMD DirectML 3. Just Install.
- The installation can take a bit. After its done and launched in the browser your done.
Install Fooocus on AMD Windows with Zluda:
For Advanced Users
GPUs Supported: AMD VEGA, Vii, APUs, RX5600XT, 5700XT, RX 6600, 7700S and above.
Requires AMD Adrenalin 24.1.1 Driver or newer.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
-
Make a new Folder on your drive (not on Desktop, downloads, documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
-
Download Fooocus from here: https://github.com/lllyasviel/Fooocus/releases/download/v2.5.0/Fooocus_win64_2-5-0.7z
It has an Update script so it will always check and apply updates at every launch automaticly. -
Move the Fooocus .zip file into the Folder you created, in my case Ai. Then Unzip the File.
-
Go into the Folder where the run.bat is located. Click in the Explorer bar (not searchbar) and type
cmd
then press enter. Then you copy and paste this command:
.\python_embeded\python.exe -m pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu118
-
Press enter, let it load and after its done you can close the cmd.
-
Launch the run.bat. It will now install everything needed and when it's done the Webui opens in your default Browser.
Its not Ready to use. Close everything and proceed with the next Steps. -
Now go into the
Fooocus\ldm_patched\modules
Folder
There right click themodel_management.py
and edit it with Notepad or Notepad++. -
In the Script at line
259-262
it looks like this:
try:
print("Device:", get_torch_device_name(get_torch_device()))
except:
print("Could not pick default device.")
Change/Replace it to this:
try:
torch_device_name = get_torch_device_name(get_torch_device())
if "[ZLUDA]" in torch_device_name:
print("Detected ZLUDA, support for it is experimental and Fooocus may not work properly.")
if torch.backends.cudnn.enabled:
torch.backends.cudnn.enabled = False
print("Disabling cuDNN because ZLUDA does currently not support it.")
torch.backends.cuda.enable_flash_sdp(False)
torch.backends.cuda.enable_math_sdp(True)
torch.backends.cuda.enable_mem_efficient_sdp(False)
if ENABLE_PYTORCH_ATTENTION:
print("Disabling pytorch cross attention because ZLUDA does currently not support it.")
ENABLE_PYTORCH_ATTENTION = False
print("Device:", torch_device_name)
except:
print("Could not pick default device.")
- Save and close the File. Proceed with the Next Steps for ZLUDA.
Setting up Zluda:
Important: If you already installed Automatic1111 or ComfyUI Zluda Version with my Guide, you can jump directly to Step 5. of the Zluda setup.
IMPORTANT: If your GPU is higher/newer than a RX6800, then skip Step 3
If you have an RX 580 move here: Guide for ROCm 5.7
-
Install AMD HIP SDK 6.1.2 from here: https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
Dont check the Pro Driver. -
Download the latest ZLUDA build for ROCm 6 as zip file from here: https://github.com/lshqqytiger/ZLUDA/releases/
Unzip as Folder and move it onto the C: Drive and rename the Folder to ZLUDA -
If your GPU is below a RX 6800, you need to do the following steps:
Check your GPUs GFX Version here: GPU GFX List
3.1 Download the corresponding .zip File for your GPUs GFX Version from here:
https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/tag/v0.6.1.2
For gfx900/906 - VEGA 56, 64 and Vii its this
3.2 Go intoC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
There copy and rename thelibrary
folder toold_library
3.3 Open the .zip file and drag and drop all files of thelibrary
folder into thelibrary
folder. Not into theold_library
folder.
If the zip contains a rocblas.dll, copy that into theC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
Important: Restart your PC after this Step before proceeding. -
Add the
C:\ZLUDA
folder and%HIP_PATH%bin
to your PATH in the System Variables. Like shown here:
https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
4.1 ONLY for RX580 Users:
Go into the Fooocus\python_embeded folder and click in the explorer bar (not searchbar)
There Type cmd and hit enter and then run these commands on by one:
pip uninstall torch torchvision torchaudio -y
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
-
Go into the
C:\ZLUDA\
Folder.
There make copy of the cublas.dll and the cusparse.dll and nvrtc.dll repaste them inside the folder.
Rename the copies to cublas64_11.dll and cusparse64_11.dll and nvrtc64_112_0.dll
Copy these two three to python_embeded\Lib\site-packages\torch\lib and overwrite if asked. -
Launch the run.bat. It will launch in your default Browser.
Noteworthy: The first image generation can take from 15 up to 40 minutes. First time only.
VERY IMPORTANT NOTICE: Before Generating, enable the Advanced Settings. Then on the Right at STYLE, DISABLE Fooocus V2. If not it will crash!
Install Fooocus for AMD on Windows with DirectML:
GPUs Supported: AMD GPUs with 8GB VRAM or more.
DirectML is slower than Zluda and requires a lot more VRAM.
Its not recommended to use Fooocus with DirectML as its only using large SDXL models. Better use any Zluda Webui Version or Auto1111 with DirectML.
Check the Preparation
- Make a new Folder on your drive (not on Desktop, downloads, documents, Programms, Onedrive) and name it Ai for example: C:\Ai\
- Download Fooocus from here:
https://github.com/lllyasviel/Fooocus/releases/download/v2.5.0/Fooocus_win64_2-5-0.7z
It has an Update script so it will always check and apply updates at every launch automaticly.
- Move the Fooocus .zip file into the Folder you created, in my case Ai. Then Unzip the File.
- Now you need to edit the 3 .bat files in there. You can do that with Notepad or Notepad++.
Right click the run.bat and edit it, Delete everything in there and replace it with this:
.\python_embeded\python.exe -m pip uninstall torch torchvision torchaudio torchtext functorch xformers -y .\python_embeded\python.exe -m pip install torch-directml .\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml pause
For the run_anime.bat replace everything with:
.\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml --preset anime pause
for the run_realistic.bat replace everything with:
.\python_embeded\python.exe -s Fooocus\entry_with_update.py --directml --preset realistic pause
- After that save and launch the run.bat File inside the Fooocus folder.
After the Installation which can take a while, is done, the Webui will autolaunch in your Default Browser.
Install Forge on AMD Windows with Zluda:
For Advanced Users
GPUs Supported: AMD VEGA, Vii, APUs, RX5600XT, 5700XT, RX 6600, 7700S and above.
Requires AMD Adrenalin 24.1.1 Driver or newer.
Preparation:
Make sure your Graphics Card Driver is updated.
You need to download and install Git 64bit setup.exe from here: https://git-scm.com/download/win
You need to download and install Python 3.10.11 64bit setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path"
Getting the Forge-Webui AMD Fork:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
Dont use the same if you had installed the DirectML webui before.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter. - Then you copy and paste this command:
`git clone https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu-forge.git
- Press enter and after its done you can close the cmd.
- Edit the webui-user.bat (right click), At the line COMMANDLINE_ARGS= You add:
--use-zluda
- Optional: Move one 1.5 based model from your other existing webui into the models/stable-diffusion folder. Or skip this if you dont have one.
- Launch the webui-user.bat, you'll get an error. Just close and go with the next steps.
Setting up Zluda:
Important: If you already installed Automatic1111 or ComfyUI Zluda Version with my Guide, you can jump directly to Step 5. of the Zluda setup.
IMPORTANT: If your GPU is higher/newer than a RX6800, then skip Step 3
If you have an RX 580 move here: Guide for ROCm 5.7
-
Install AMD HIP SDK 6.1.2 from here: https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
Dont check the Pro Driver. -
Download the latest ZLUDA build for ROCm 6 as zip file from here: https://github.com/lshqqytiger/ZLUDA/releases/
Unzip as Folder and move it onto the C: Drive and rename the Folder to ZLUDA -
If your GPU is below a RX 6800, you need to do the following steps:
Check your GPUs GFX Version here: GPU GFX List
3.1 Download the corresponding .zip File for your GPUs GFX Version from here:
https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/tag/v0.6.1.2
For gfx900/906 - VEGA 56, 64 and Vii its this
3.2 Go intoC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
There copy and rename thelibrary
folder toold_library
3.3 Open the .zip file and drag and drop all files of thelibrary
folder into thelibrary
folder. Not into theold_library
folder.
If the zip contains a rocblas.dll, copy that into theC:\Program Files\AMD\ROCm\6.1\bin\rocblas
folder.
Important: Restart your PC after this Step before proceeding. -
Add the
C:\ZLUDA
folder and%HIP_PATH%bin
to your PATH in the System Variables. Like shown here:
https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows -
Launch the webui-user.bat. It will install everything and open in your default Browser.
Noteworthy: The first image generation can take from 15 up to 40 minutes. First time only.
5.1 If you get a missing GGUF module error, do this:
Go into Forges folder. Then click into the File Explorer bar (not searchbar).
type cmd and hit enter
then run the following two commands one by one:
venv\Scripts\activate.bat
pip install gguf
Then relaunch the webui-user.bat
Additional Step ONLY for RX580 Users:
Go into the stable-diffusion-webui-amdgpu-forge folder and click in the explorer bar (not searchbar)
There Type cmd and hit enter and then run these three commands on by one:
venv\scripts\activate
pip uninstall torch torchvision torchaudio -y
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
Linking Models, Loras, etc. from other Webui's or Folders to Forge:
If you want to link all models from an other Webui you can do that by editing the webui-user.bat like this where you set the A1111_HOME to the Path where your Automatic1111 is installed or where you store your models. Here is an example:
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--zluda
@REM Uncomment following code to reference an existing A1111 checkout.
set A1111_HOME=D:/Programme/AI-Zeug/stable-diffusion-webui-amdgpu
@REM
@REM set VENV_DIR=%A1111_HOME%/venv
set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^
--ckpt-dir %A1111_HOME%/models/Stable-diffusion ^
--hypernetwork-dir %A1111_HOME%/models/hypernetworks ^
--embeddings-dir %A1111_HOME%/embeddings ^
--vae-dir %A1111_HOME%/models/vae ^
--controlnet-dir %A1111_HOME%/models/controlnet ^
--lora-dir %A1111_HOME%/models/Lora
call webui.bat
Getting the Autoamatic1111 AMD Fork:
- Make a new Folder on your Drive (not on Desktop, Downloads, Documents, Programms, Onedrive) and name it SD-Zluda.
Dont use the same if you had installed the DirectML webui before.
- You go into the folder you created in this case SD-Zluda, then click in the File Explorer bar (not searchbar) and type
cmd
then press enter. - Then you copy and paste this command:
git clone https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu && cd stable-diffusion-webui-amdgpu && git submodule init && git submodule update
- Press enter and after its done you can close the cmd.
- Edit the webui-user.bat (right click), At the line COMMANDLINE_ARGS= You add:
--use-zluda --update-check --skip-ort
- Optional: Move one 1.5 based model from your other existing webui into the models/stable-diffusion folder. Or skip this if you dont have one.
- Launch the webui-user.bat, you'll get an error. Just close and go with the next steps.
If you want to use HIP SDK 5.7 with ZLUDA you need to do the following steps:
-
Install AMD HIP SDK 5.7.1 from here: https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
Leave every setting as it is when installing. -
Download the ROCm 5.7 compatible ZLUDA build as zip file from here: https://github.com/lshqqytiger/ZLUDA/releases/download/rel.c0804ca624963aab420cb418412b1c7fbae3454b/ZLUDA-windows-rocm5-amd64.zip
Unzip as Folder and move it onto the C: Drive and rename the Folder to ZLUDA.
For RX 6700 or 6700XT download Optimised_ROCmLibs_gfx1031.7z
For RX 6600 or 6600XT download Optimised_ROCmLibs_gfx1032.7z
For RX 580, 5600/XT, 5700/XT, VEGA 56, VEGA 64 and Radeon VII or RX7700S you need to download the ROCmLibs.7z
For AMD 780M-APU you need to follow the steps here: https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU-
ALternative ROCm Libs can be found here: https://github.com/likelovewant/ROCmLibs-for-gfx1103-AMD780M-APU/releases/tag/v0.5.7 -
Go into the
C:\Program Files\AMD\ROCm\5.7\bin\rocblas
folder.
There copy and rename thelibrary
folder toold_library
Open the .zip file and drag and drop all files of thelibrary
folder into thelibrary
folder. Not into theold_library
folder.
If the zip contains a rocblas.dll, copy that into theC:\Program Files\AMD\ROCm\5.7\bin\rocblas
folder.
Important: Restart your PC after these Steps before proceeding. -
Add the
C:\ZLUDA
folder and%HIP_PATH%bin
to your PATH in the System Variables. Like shown here:
https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows -
Go into the
C:\ZLUDA\
Folder.
There make copy of the cublas.dll and the cusparse.dll and nvrtc.dll repaste them inside the folder.
Rename the copies to cublas64_11.dll and cusparse64_11.dll and nvrtc64_112_0.dll
You can use these 3 files to replace them in torch folders of different webuis if needed.
Additional Step ONLY for RX570/580 Users:
Go into the main folder of the webui and click in the explorer bar (not searchbar)
There Type cmd and hit enter and then run these three commands on by one:
venv\scripts\activate
pip uninstall torch torchvision torchaudio -y
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
Also add --medvram
to the webui-user.bat
Here are some things to check before opening up an Issue:
-
Make sure your Graphics Card Driver is updated.
For NVIDIA: https://www.nvidia.com/en-us/drivers/
For AMD: https://www.amd.com/en/support/download/drivers.html -
Git 64bit needs to be installed, download the setup.exe from here: https://git-scm.com/download/win
-
Python 3.10.11 64bit needs to be installed, download the setup.exe from here: https://www.python.org/downloads/release/python-31011/
In the first screen check "Add Python to Path", and Optional in the last Screen click "Disable Windows Path Lenght Limit" -
Clear the Pip cache and the venv:
Open up a CMD and type:pip cache purge
-
Delete the venv folder. Its in the Webui's main folder and then relaunch the Webui.
Specific for AMD:
- Make sure the correct HIP SDK Version is installed.
- Make sure the Environment Path Settings are correct like stated in the ZLUDA Guides.
- Make sure the correct ZLUDA Version is downloaded.
- Make sure the correct ROCm library files are downloaded and replaced the old ones.
- Make sure the Computer got rebooted at least one time before trying to generate an Image.
- Make sure you let the Webui loading at least for 40 Minutes and relaunched when using a ZLUDA Guide.
How to upgrade or downgrade ROCm and ZLUDA:
- Uninstall all HIP SDK programms in the System control.
- Download the HIP SDK Verison you want to switch to and leave everything at default settings.
- Reboot the PC.
- Delete the content of the C:\ZLUDA folder so that its empty.
- Download the correct ZLUDA Version depending on your installed HIP SDK Version from here:
https://github.com/lshqqytiger/ZLUDA/releases/
- Extract the files into the C:\ZLUDA folder.
- There make copy of the cublas.dll and the cusparse.dll and nvrtc.dll repaste them inside the folder.
Rename the copies to cublas64_11.dll and cusparse64_11.dll and nvrtc64_112_0.dll
You can use these 3 files to replace them in torch folders of different webuis.
- Check the PATH in System Environment Variables.
Make sure only the
%HIP_PATH%bin
is listed there or the correct path to the HIP SDK ROCm Version you installed. - Delete the venv and the .zluda folder if a Webui has it and relaunch the Webui.