Skip to content

Instantly share code, notes, and snippets.

@alshdavid
Last active August 8, 2025 01:36
Show Gist options
  • Select an option

  • Save alshdavid/2fe760e2f8d98559df7643db78944744 to your computer and use it in GitHub Desktop.

Select an option

Save alshdavid/2fe760e2f8d98559df7643db78944744 to your computer and use it in GitHub Desktop.
ComfyiUI-Zluda AMD 9070xt

Minimal ComfyUI Zluda Setup for Windows

This sets up ComfyUI Zluda for AMD devices without a system Python installation, venvs or magic scripts.

It assumes you're using up to date Windows development tools and know your way around a terminal

Prereqs

Run all commands from PowerShell Core

Clone ComfyUI-ZLUDA

# PowerShell Core
# Whatever root path you want
cd ~
git clone "https://github.com/patientx/ComfyUI-Zluda.git" comfyui

Ignore changes we will make to repo

# PowerShell Core
cd comfyui
"`n.local" | Out-File -Append .gitignore
mkdir .local
cd .local
# Download scripts here

Download the scripts to comfyui/.local

Download Python 3.11

Download python standalone/portable from here:

https://github.com/astral-sh/python-build-standalone/releases https://github.com/astral-sh/python-build-standalone/releases/download/20250807/cpython-3.11.13+20250807-x86_64-pc-windows-msvc-install_only.tar.gz

Note, check the releases for the latest one. They rebuild them frequently

Extract it to comfyui/.local/python

Make sure comfyui/.local/python/python.exe exists

Download Zluda

Download Zluda from here:

https://github.com/lshqqytiger/ZLUDA/releases

Extract it to comfyui/.local/zluda

Make sure comfyui/.local/zluda/zluda.exe exists

Run Install Script

Run this once to setup

# PowerShell Core
cd comfyui
.\.local\install.ps1

Start Comfyui

# PowerShell Core
cd comfyui
.\.local\start.ps1
# Run once to set up ComfyUI
$ComfyuiRoot = Split-Path -Path $PSScriptRoot -Parent
$PythonRoot = "$PSScriptRoot\python"
$ZludaRoot = "$PSScriptRoot\zluda"
$env:PATH = ";$PythonRoot;" + $env:PATH
$env:PATH = ";$PythonRoot\Scripts;" + $env:PATH
$env:PATH = ";$ZludaRoot;" + $env:PATH
Set-Location -Path $ComfyuiRoot
python -m pip install --upgrade pip
python -m pip install -r .\requirements.txt
python -m pip uninstall torch torchvision torchaudio -y
python -m pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
python -m pip install onnxruntime
python -m pip uninstall numpy -y
python -m pip install numpy==1.26.4
Copy-Item -Path $PSScriptRoot\zluda\cublas.dll -Destination $PSScriptRoot\python\Lib\site-packages\torch\lib\cublas64_11.dll -Force
Copy-Item -Path $PSScriptRoot\zluda\cusparse.dll -Destination $PSScriptRoot\python\Lib\site-packages\torch\lib\cusparse64_11.dll -Force
Copy-Item -Path $PSScriptRoot\python\Lib\site-packages\torch\lib\nvrtc64_112_0.dll -Destination $PSScriptRoot\python\Lib\site-packages\torch\lib\nvrtc_cuda.dll -Force
Copy-Item -Path $PSScriptRoot\zluda\nvrtc.dll -Destination $PSScriptRoot\python\Lib\site-packages\torch\lib\nvrtc64_112_0.dll -Force
$env:PATH = ";$PSScriptRoot\python;" + $env:PATH
$env:PATH = ";$PSScriptRoot\python\Scripts;" + $env:PATH
$env:PATH = ";$PSScriptRoot\zluda;" + $env:PATH
# Optional: Ignore onboard GPU
$env:HIP_VISIBLE_DEVICES=1
zluda -- python.exe .\main.py --disable-auto-launch --use-quad-cross-attention --reserve-vram 0.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment