40系显卡的stable diffusion webui优化版
粗翻:讨论区里看到的针对40系显卡下sd webui的安装方案,已优化到性能最佳 (cu117 and cudnn8.7), 总共有5步
1
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
2
编辑 launch.py:
把这行改成 : (行数可能有变化, 大概在 160 - 180 approx)
torch_command = os.environ.get('TORCH_COMMAND', "pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117")
把这行改成:
xformers_windows_package = os.environ.get('XFORMERS_WINDOWS_PACKAGE', 'https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/torch13/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl')
3
下载 cuda 8.7文件:
https://developer.download.nvidia.com/compute/redist/cudnn/v8.7.0/local_installers/11.8/cudnn-windows-x86_64-8.7.0.84_cuda11-archive.zip
解压后复制 .dll到 "stable-diffusion-main\venv\Lib\site-packages\torch\lib"进行替换
4
在web-user.bat里的command arguments 的等号后面添加 --xformers
5
add model to \models\Stable-diffusion
run webui-user.bat
原地址https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2449#issuecomment-1320800317,作者zencyon