patientx / ComfyUI-Zluda

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface. Now ZLUDA enhanced for better AMD GPU performance.
GNU General Public License v3.0
116 stars 7 forks source link
amd comfyui cuda rocm stable-diffusion windows zluda

# ComfyUI-ZLUDA

## What's New ?

*** BIG UPDATE. Things got broken, had to reset the fork, to get back and update successfully , on the comfyui-zluda directory run these one after another : git fetch --all (enter) git reset --hard origin/master (enter) now you can run comfyui.bat , it will update to the latest version. And also after this a reboot of windows might be needed if the generation time seems to be low. After reboot speed returns to normal.

## CREDITS

- comfyui (https://github.com/comfyanonymous/ComfyUI) - Zluda wiki from sdnext (https://github.com/vladmandic/automatic/wiki/ZLUDA) - brknsoul for rocm libraries (https://github.com/brknsoul/ROCmLibs) - lshqqytiger (https://github.com/lshqqytiger/ZLUDA) - LeagueRaINi (https://github.com/LeagueRaINi/ComfyUI) - ComfyUI-Manager (https://github.com/ltdrdata/ComfyUI-Manager)

## DEPENDENCIES

If coming from the very start, you need : 1. **Git** : download from https://git-scm.com/download/win . During installation don't forget to check the box for "Use Git from the Windows Command line and also from 3rd-party-software" to add Git to your system's PATH . 2. **Python** (3.10.11 or 3.11 from the official website) : Install latest release from python.org . DON'T USE WINDOWS STORE VERSION. If you have that installed, uninstall and please install from python.org .   During installation don't forget to check the box for "Add Python to PATH when you are at the the "Customize Python" screen. 3. **Visual C++ Runtime** : download from https://aka.ms/vs/17/release/vc_redist.x64.exe , install it. 4. Install **HIP SDK 5.7.1** from https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html ((UPDATE: HIP 6.1.2 released now, but there are problems so no need to use that one please be careful about selecting the correct version, "Windows 10 & 11 5.7.1 HIP SDK")) 5. Add the system variable HIP_PATH , value : C:\\Program Files\\AMD\\ROCm\\5.7\\ (this is the default folder, if you installed it on another drive, change if necessary) - 1. Check the variables on the lower part (System Variables) , there should be a variable called : HIP_PATH . - 2. Also check the variables on the lower part (System Variables) , there should be a variable called : "Path". Double click it and click "New" add this : C:\Program Files\AMD\ROCm\5.7\bin 6. If you have an AMD GPU below 6800 (6700,6600 etc.) , download the recommended library files for you gpu from : https://github.com/brknsoul/ROCmLibs/ - 1. Go to folder C:\Program Files\AMD\ROCm\5.7\bin\rocblas , there would be a "library" folder, backup the files inside to somewhere else. - 2. Open your downloaded optimized library archive and put them inside the library folder (overwriting if necessary) : "C:\\Program Files\\AMD\\ROCm\\5.7\\bin\\rocblas\\library" 7. Reboot your system.

## SETUP (FOR WINDOWS ONLY)

Open a cmd prompt.

git clone https://github.com/patientx/ComfyUI-Zluda
cd ComfyUI-Zluda
install.bat

to start for later use (or create a shortcut to) :

comfyui.bat

also for later when you need to repatch zluda (maybe a torch update etc.) you can use :

patchzluda.bat

  !!! This might happen with torch changes , zluda version changes and / or gpu driver changes. !!!

## TROUBLESHOOTING