网页浏览总次数

星期三, 二月 14, 2024

stable-diffusion-webui源码部署

 大概是22年时候跑的流程,可以参考,现在应该流程有变化更简单。


安装软件和环境配置

 

Git

下一步即可

Python

勾选 添加环境变量

dev-sidecar

添加证书


 

 













一直启动代理工具即可










Cmd检查环境

Git

Python

 

克隆源码

使用Cmd,powershell,git bash here都可以

Git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui

 

修改镜像

Cmd

Pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

Pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

 

准备模型(开源的或者别人训练后开源的或者自己训练的模型)文件

 

stable-diffusion-webui\models\Stable-diffusion目录

放置模型,例:图为NovelAI



 



webui-user.bat修改

set COMMANDLINE_ARGS=--ckpt .\models\Stable-diffusion\nai.ckpt

 

双击运行得到反馈后关闭cmd


 


根目录会生成stable-diffusion-webui\venv\Scripts目录

 

Cmd操作


 









拖拽pip.exe 空格install空格 拖拽

torch-1.12.1+cu113-cp310-cp310-win_amd64.whl文件到cmd窗口 后回车安装

 



 



stable-diffusion-webui\venv\Scripts目录 升级pip

python.exe -m pip install --upgrade pip

 

安装成功后 双击webui-user.bat 继续安装核心模组

安装失败 关闭cmd 继续重复操作

如果多次不行 或者

安装一半强行退出 再打开报错 可以删除下一半的文件夹再试

stable-diffusion-webui\repositories 目录

 

(缺少模组 则使用pip命令下载即可(在根目录中打开powershellcmd后)

pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple transformers==xx版本

缺少模组 或者版本低 有提示敲的代码都敲一下)

 


 

提升gfpgan等模组安装失败 不是pip的问题 可以断开/启动代理来回切换 再运行webui-user.bat 尝试安装

 


 

 







下载完成返回 http://127.0.0.1:7860 复制地址到浏览器打开即可

之后运行webui-user.bat 即可运行(不要关闭cmd界面)

 

更新源码 根目录右键git bash here

Git pull

官方汉化包 部署

删除根目录localizations文件夹

根目录 git bash here

git clone https://github.com/VinsonLaro/stable-diffusion-webui-chinese localizations

 


 










下载的目录结构


 

 





更新汉化包

localizations目录右键git bash here

Git pull

 

Webui设置中切换语言

运行wenui界面进入user interface切换后apply settings


 



界面最下面运行


 


会重新刷新界面 进入汉化模式






没有评论:

发表评论