- 安装 python 3.10.6
- 安装 git
- git clone repo
- 去 hugging face 里下载 Stable diffusion 的 model,放进项目文件中的 models – Stable-diffusion 中( 这就是将要使用的大模型,也可以去 civitai 中下载需要的 model )
- 在项目中的 webui.bat 中添加这段代码 set COMMANDLINE_ARGS=–no-gradio-queue
- 开启魔法,运行 webui.bat
@echo off
if exist webui.settings.bat (
call webui.settings.bat
)
set COMMANDLINE_ARGS=--no-gradio-queue
if not defined PYTHON (set PYTHON=python)
if defined GIT (set "GIT_PYTHON_GIT_EXECUTABLE=%GIT%")
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
注意:如果是最新的 5060 显卡,CUDA 是 12.9 版本,会和项目虚拟环境中的 pytorch 不兼容,需要降低 CUDA版本,并卸载原来的 pytorch 然后安装相匹配的 pytorch 版本
文章来源于互联网:Stable diffusion 本地部署
5bei.cn大模型教程网











