#记录工作,工作复盘
仅作记录,未尽之处请补充,谢谢!
电脑配置情况大致记录如下,请参考:
MSI移动工作站,64G内存,4GB显存
一、安装前准备:
阅读文档,明确软件依赖和安装要求:
在用Anaconda环境下安装stable-diffusion-webui之前,电脑上先要安装有以下软件:
1、Anaconda
首先安装 Anaconda,本处用于可窗口化的管理虚拟环境和方便解决环境中包的依赖问题
可以参考本站大神的详细文章教程:
Anaconda超详细安装教程(Windows环境下)_conda安装-CSDN博客https://blog.csdn.net/fan18317517352/article/details/123035625![](https://img-blog.csdnimg.cn/direct/3abf6414e8ac4b6cbe46e1dd2a082ae1.png)
2、PyCharm
其次安装PyCharm,本处用于方便地在指定的虚拟环境和项目路径下修改、编辑和调试运行代码
可以参考本站大神的详细文章教程:
3、Python
Stable-Diffusion-Webui需求的python 3.10.6 版本
此处python不用单独安装,安装Anaconda后在conda的虚拟环境中可按要求任意指定python版本
因为电脑上有多个python版本,所有用Anaconda管理运行指定的python环境和用PyCharm运行stable-diffusion-webui项目比较稳妥,不会影响后续再安装的python项目和以前已有的python项目运行。
stable-diffusion-webui项目官方文档建议python=3.10.6,我用python3.11.5安装不成功,所以首次安装建议还是老老实实的用官方建议的要求来安装,后续再些许微调。
4、GIT
本处用于克隆和Github上的项目文件和保持或推送项目文件更新
可以参考本站大神的详细文章教程:
5、Visual Studio 2022
安装了Visual Studio 2022或Visual Studio 2019版本,并且下载并启用了C++相关组件
可以参考本站大神的详细文章教程:
(一看就会)Visual Studio2022安装配置详细教程_visual studio 2022-CSDN博客https://blog.csdn.net/DuanNaiLin/article/details/132841938?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170497955816800213018377%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170497955816800213018377&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-132841938-null-null.142%5Ev99%5Epc_search_result_base4&utm_term=Visual%20Studio%202022&spm=1018.2226.3001.4187
二、开始安装(新建conda环境 克隆项目)
以下是记录的安装操作步骤:
没有Anaconda的先安装Anaconda,已有Anaconda的开始新建运行环境:
在以管理员身份运行Anaconda Prompt(base)中,输入以下命令,我这里用的环境名是“StableDiffusion”来举例,环境名可以自己定义,注意字母的大小写和不要有空格,空格可以用连接符“-”来连接,比如环境名“Stable-Diffusion”或者“s-d-w”,最好直接用“sdw”这样自己能区分又易记且简短的环境名:
#新建名为“StableDiffusion”并且python版本等于3.10.6的Conda环境,默认操作是确认yes
conda create -n StableDiffusion python=3.10.6 -y
1、新建Anaconda环境,指定Python版本为3.10.3,默认同意执行全部操作“-y”
2、激活刚才新建的Anaconda环境
等运行一段时间,新建环境完成之后, 一定要继续输入命令来先激活环境:
#激活刚才新建的 名为“StableDiffusion”(并且python版本等于3.10.6的)Conda环境
conda activate StableDiffusion
这里先激活是避免后续因环境没激活而产生的连环错误。
3、打开PyCharm新建项目
确定所在文件夹,配置刚才已经激活的环境解释器为本项目的解释器,这一步比较重要。
比如用PyCharm新建项目位于D:\PythonProject目录下,新建名为stable-diffusion-webui的文件夹;
并配置前面步骤已经新建好的环境解释器作为本项目的解释器(conda环境中的python.exe路径)
可以参考本站大神的详细文章教程:
PyCharm与Anaconda超详细安装配置教程_pycharm安装anaconda环境-CSDN博客https://blog.csdn.net/qq_32892383/article/details/116137730?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170498047516800184141989%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170498047516800184141989&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-116137730-null-null.142%5Ev99%5Epc_search_result_base4&utm_term=pycharm%E9%85%8D%E7%BD%AEanaconda&spm=1018.2226.3001.4187重点参考在这篇文章的结尾部分。
4、用PyCharm从远程克隆项目到本地
在PyCharm左上角图标处点击弹出的菜单栏上找到GIT——拉取——然后填入地址:
GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI
怎么拉取可以参考本站大神的详细文章教程:
三、为conda环境编辑代码文件
1、编辑“webui-user.bat”文件
在PyCharm窗口中打开项目中的文件“webui-user.bat”并编辑
set PYTHON=这里粘贴前面新建过的虚拟环境中的python路径
(找到位置后鼠标右键“复制文件地址”,然后在等号后这里直接粘贴)
例如我的:
set PYTHON="D:\ProgramData\anaconda3\envs\StableDiffusion\python.exe"
set GIT=这里粘贴系统环境变量里的第一个GIT软件的路径
(找到系统变量里的位置靠上的GIT软件路径,找到后复制路径,然后在等号后这里直接粘贴)
例如我的:
set GIT="D:\msys64\usr\bin\git.exe"
系统里有可能会存在多个GIT路径,需要查找GIT在环境变量里靠前的第一个路径
set VENV_DIR=这里粘贴前面新建过的本项目的虚拟环境中的目录路径
(找到虚拟环境所在目录后标题栏复制地址,然后在等号后这里直接粘贴)
例如我的:
set VENV_DIR="D:\ProgramData\anaconda3\envs\StableDiffusion\"
set COMMANDLINE_ARGS=这里是填写启动和设置的一些参数
(这里的参数可以在后边软件配置后,调试功能后再修改或增加参数来设置)
例如我的:
set COMMANDLINE_ARGS=--xformers --autolaunch --no-half --lowvram --precision full --disable-nan-check
这条可以后期使用时,根据实现情况再作设置和调整,请参考本文第“六、调参、使用”
2、编辑“webui.bat”文件
紧接着在PyCharm窗口中打开打开“webui.bat”文件,CTRL+F在搜索框里输入“Scripts”,将带“/Scripts/”的字符路径删掉,比如语句是:
#原语句:
:activate_venv
set PYTHON="%VENV_DIR%\Scripts\Python.exe"
echo venv %PYTHON%
#删除修改后的语句:
:activate_venv
set PYTHON="%VENV_DIR%\Python.exe"
echo venv %PYTHON%
记得大概是有3处吧
这里删改的目的和作用是:
目的是修改成我们conda虚拟环境可以识别和使用的路径;
作用是可以让程序正常在conda的虚拟环境中运行,并且不会再在根目录创建“.venv”文件夹和文件,减少本目录里的空间占用,并且方便用Anaconda的IDE或Anaconda Prompt进行管理和解决环境中的各种问题等。
其实在conda环境中安装,还会修改到其他文件,包括环境目录路径下的一些.py程序的代码,不过由于影响不大或者是些不太重要的警告信息,解除后因当时没有详细记录,有需要探讨的请评论留言,谢谢!
四、进行安装
1、运行“webui-user.bat”文件进行安装
在powershell7及以上版本中的用法是需要在文件名前加“.\”
#使用语法在文件名前加“.\”
.\webui-user.bat
看到输出“Running on local URL: http://127.0.0.1:7860” 时,算是基本安装成功。
2、安装额外的依赖模块
在输出窗口的信息中,翻阅报错信息,比如:没有到到XX模块这样的。
根据输出信息显示没找到哪个模块就用pip安装哪个模块,例如:pip install XXX。
然后关闭pycharm里的终端,重新打开终端,输入“.\webui-user.bat”重新运行。并查看输出信息,针对性的排除启动故障。
三、安装模型
安装模型其实比较简单,过程就是下载所需的模型文件后完整复制模型文件到对应的文件夹中。
1、下载模型文件
为什么单独说下载模型文件这个事,是因为下载其实由于网络原因会比较麻烦。
模型是使用Stable-Diffusion-Webui必不可少的,可以在搜索引擎中搜索“Stable-Diffusion-Webui 模型”,并根据教程下载相关模型文件。
因为模型太多了,功能也有差异,还有很多插件也需要单独的小模型文件,所以这里就不再过多赘述了,网上的教程有很多,都很有参考价值。优质的模型网站也有很多,比如C站和抱脸虫站等,但网络问题需要解决,有些模型文件很大,下载器也要好使并设置好能使用代理。
2、安装模型文件
模型下载后,要按照使用教程,将模型文件复制进Stable-Diffusion-Webui目录下相应的文件夹。
比如主模型要放进主模型的文件夹中
插件模型要放进插件模型的相应文件夹中
可以参考本站大神的详细文章教程:
stable diffusion(安装以及模型的初步使用)_stable diffusion 模型安装-CSDN博客https://blog.csdn.net/qq_44963223/article/details/129941138?ops_request_misc=&request_id=&biz_id=102&utm_term=Stable-Diffusion-Webui%20%E6%A8%A1%E5%9E%8B&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-4-129941138.142%5Ev99%5Epc_search_result_base4&spm=1018.2226.3001.4187
四、更改使用界面语言为中文
这里是扩展插件界面加载后搜索并安装一个插件,然后重启下Stable-Diffusion-Webui就可以了
可以参考本站大神的详细文章教程:
探索【Stable-Diffusion WEBUI】的插件:界面主题与中文翻译_stable diffusion提示词翻译-CSDN博客https://blog.csdn.net/ddrfan/article/details/130290864?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170498215116800227483596%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170498215116800227483596&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-130290864-null-null.142%5Ev99%5Epc_search_result_base4&utm_term=Stable-Diffusion-Webui%20%E4%B8%AD%E6%96%87&spm=1018.2226.3001.4187
五、安装扩展等
安装可能会需要用到的扩展
比如换脸插件、图片转视频插件等
同样也可以先搜索然后安装
可以参考本站大神的详细文章教程:
Stable Diffusion - 扩展 Roop 换脸 (Face Swapping) 插件的配置与使用_8x_nmkd-superscale_150000_g-CSDN博客https://blog.csdn.net/caroline_wendy/article/details/131856141?ops_request_misc=&request_id=&biz_id=102&utm_term=Stable-Diffusion-Webui%20%E6%8D%A2%E8%84%B8%E6%8F%92%E4%BB%B6&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-131856141.142%5Ev99%5Epc_search_result_base4&spm=1018.2226.3001.4187![](https://img-blog.csdnimg.cn/direct/99b5a746b89c422f8155b7ab108d069f.png)
六、调参,使用
调参:
调整启动参数,比如出黑图的情况,或者马赛克的情况等
可以参考本站大神的详细文章教程:
记录下StableDiffusion的webui启动参数(cmd_args.py)_stable-diffusion-webui 启动参数-CSDN博客https://blog.csdn.net/qq_42160304/article/details/133530178?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170498244816800192211892%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170498244816800192211892&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-5-133530178-null-null.142%5Ev99%5Epc_search_result_base4&utm_term=Stable-Diffusion-Webui%20%E5%90%AF%E5%8A%A8%E5%8F%82%E6%95%B0&spm=1018.2226.3001.4187
使用:
另外,附上完整的启动输出日志以供参考。如下:
(StableDiffusion) PS D:\PythonProject\stable-diffusion-webui> .\webui-user.bat
Using existing venv in directory "D:\ProgramData\anaconda3\envs\StableDiffusion\"
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:29:51) [MSC v.1929 64 bit (AMD64)]
Version: v1.7.0-2-g3e9773a6
Commit hash: 3e9773a667503d9aee847862c2abb6eb36411523
Installing sd-webui-controlnet requirement: trimesh[easy]
Faceswaplab : Use GPU requirements
Checking faceswaplab requirements
0.03342500000144355
ReActor preheating... Device: CUDA
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: insightface in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.7.3)
Requirement already satisfied: onnx in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 2)) (1.14.0)
Requirement already satisfied: onnxruntime in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (1.15.0)
Requirement already satisfied: opencv-python in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 4)) (4.8.1.78)
Requirement already satisfied: ifnude in c:\users\love\appdata\roaming\python\python310\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 5)) (0.0.3)
Requirement already satisfied: cython in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from -r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 6)) (3.0.6)
Requirement already satisfied: numpy in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.23.5)
Requirement already satisfied: tqdm in c:\users\love\appdata\roaming\python\python310\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (4.66.1)
Requirement already satisfied: requests in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (2.31.0)
Requirement already satisfied: matplotlib in c:\users\love\appdata\roaming\python\python310\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.8.0)
Requirement already satisfied: Pillow in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (9.5.0)
Requirement already satisfied: scipy in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.11.4)
Requirement already satisfied: scikit-learn in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.3.2)
Requirement already satisfied: scikit-image in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.21.0)
Requirement already satisfied: easydict in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.11)
Requirement already satisfied: albumentations in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.3.1)
Requirement already satisfied: prettytable in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.9.0)
Requirement already satisfied: protobuf>=3.20.2 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from onnx->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 2)) (3.20.3)
Requirement already satisfied: typing-extensions>=3.6.2.1 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from onnx->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 2)) (4.9.0)
Requirement already satisfied: coloredlogs in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (15.0.1)
Requirement already satisfied: flatbuffers in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (23.5.26)
Requirement already satisfied: packaging in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (23.2)
Requirement already satisfied: sympy in c:\users\love\appdata\roaming\python\python310\site-packages (from onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (1.12)
Requirement already satisfied: opencv-python-headless>=4.5.1.48 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from ifnude->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 5)) (4.8.1.78)
Requirement already satisfied: PyYAML in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from albumentations->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (6.0.1)
Requirement already satisfied: qudida>=0.0.4 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from albumentations->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.0.4)
Requirement already satisfied: networkx>=2.8 in c:\users\love\appdata\roaming\python\python310\site-packages (from scikit-image->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.1)
Requirement already satisfied: imageio>=2.27 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-image->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (2.33.0)
Requirement already satisfied: tifffile>=2022.8.12 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-image->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (2023.12.9)
Requirement already satisfied: PyWavelets>=1.1.1 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-image->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.5.0)
Requirement already satisfied: lazy_loader>=0.2 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-image->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.3)
Requirement already satisfied: humanfriendly>=9.1 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from coloredlogs->onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (10.0)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\love\appdata\roaming\python\python310\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.1.1)
Requirement already satisfied: cycler>=0.10 in c:\users\love\appdata\roaming\python\python310\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\love\appdata\roaming\python\python310\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (4.43.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\love\appdata\roaming\python\python310\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\love\appdata\roaming\python\python310\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (2.8.2)
Requirement already satisfied: wcwidth in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from prettytable->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.2.12)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\love\appdata\roaming\python\python310\site-packages (from requests->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\love\appdata\roaming\python\python310\site-packages (from requests->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\love\appdata\roaming\python\python310\site-packages (from requests->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from requests->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (2023.11.17)
Requirement already satisfied: joblib>=1.1.1 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-learn->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.3.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from scikit-learn->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (3.2.0)
Requirement already satisfied: mpmath>=0.19 in c:\users\love\appdata\roaming\python\python310\site-packages (from sympy->onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (1.3.0)
Requirement already satisfied: colorama in c:\users\love\appdata\roaming\python\python310\site-packages (from tqdm->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (0.4.6)
Requirement already satisfied: pyreadline3 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 3)) (3.4.1)
Requirement already satisfied: six>=1.5 in d:\programdata\anaconda3\envs\stablediffusion\lib\site-packages (from python-dateutil>=2.7->matplotlib->insightface->-r D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-roop\requirements.txt (line 1)) (1.16.0)
Launching Web UI with arguments: --xformers --autolaunch --no-half --lowvram --precision full --disable-nan-check
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [00:00<00:00, 7101.77it/s]
[AddNet] Updating model hashes...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [00:00<00:00, 6249.34it/s]
ControlNet preprocessor location: D:\PythonProject\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-01-11 22:03:03,691 - ControlNet - INFO - ControlNet v1.1.427
2024-01-11 22:03:03,983 - ControlNet - INFO - ControlNet v1.1.427
sd-webui-prompt-all-in-one background API service started successfully.
22:03:05 - ReActor - STATUS - Running v0.6.0-a4
2024-01-11 22:03:05,615 - roop - INFO - roop v0.0.2
2024-01-11 22:03:05,704 - roop - INFO - roop v0.0.2
Loading weights [0158e0715e] from D:\PythonProject\stable-diffusion-webui\models\Stable-diffusion\0.7(majicmixRealistic_v7) + 0.3(vae-ft-mse-840000-ema-pruned).safetensors
2024-01-11 22:03:05,889 - AnimateDiff - INFO - Injecting LCM to UI.
2024-01-11 22:03:06,725 - AnimateDiff - INFO - Hacking i2i-batch.
Creating model from config: D:\PythonProject\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
Running on local URL: http://127.0.0.1:7860
Loading VAE weights specified in settings: D:\PythonProject\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: xformers... done.
To create a public link, set `share=True` in `launch()`.
Model loaded in 7.7s (load weights from disk: 2.4s, create model: 2.0s, apply weights to model: 1.3s, apply float(): 0.6s, load VAE: 0.5s, calculate empty prompt: 0.9s).
Startup time: 95.6s (initial startup: 0.1s, prepare environment: 38.8s, import torch: 9.4s, import gradio: 5.0s, setup paths: 2.6s, initialize shared: 0.5s, other imports: 1.8s, setup codeformer: 0.4s, load scripts: 7.4s, create ui: 3.3s, gradio launch: 5.0s, app_started_callback: 21.1s).
运行界面:
未尽之处欢迎在评论区补充和一起讨论,谢谢。
附注:实际在Windows11的conda环境安装过程中,还会出现一些状况,不过目前已经基本得到完美的解决,比如修改一些项目中的”.py“文件和一些主项目还有插件的“requirements.txt”文件的内容,修改一些虚拟环境中的导入语句设置等,不过影响不大,已基本排除完,能够不报错健康运行,本次复盘记录的比较粗糙,更多信息欢迎共同探讨,谢谢!
版权归原作者 love530love 所有, 如有侵权,请联系我们删除。