长沙网站制作哪,长春网站制作培训,网站 验证码 错误,中国软件公司排名100强注#xff1a;本人使用的是 RTX2060 - 6G版
特别提醒#xff1a;安装一定要 CUDA 和 PyTorch 版本能配套用#xff0c;不然会有生成保存问题(我是这样的)#xff0c;装完用 python -m xformers.info 这个看对应的版本
建议#xff1a;有些命令安装在venv 虚拟机中做本人使用的是 RTX2060 - 6G版
特别提醒安装一定要 CUDA 和 PyTorch 版本能配套用不然会有生成保存问题(我是这样的)装完用 python -m xformers.info 这个看对应的版本
建议有些命令安装在venv 虚拟机中做这样东西都在venv对应目录 在最后有些资源我在对应官网下了放在百度网盘有些下的慢的可以去里面下 安装Git https://registry.npmmirror.com/-/binary/git-for-windows/v2.38.1.windows.1/Git-2.38.1-64-bit.exe 安装python3.10.6 官方的
https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe华为代理的
https://mirrors.huaweicloud.com/python/3.10.9/python-3.10.9-amd64.exe
注意
Windows下安装Python时请务必勾选“Add Python to PATH”以后我们调度Python时会方便很多。
如果你选择的是自定义安装请务必在安装组件选择中勾选PIPPython的包管理工具无论是在接下来的安装中还是后续的使用中我们都需要用到它。 Nvidia CUDA按需 注意如果CUDA版本不对卸载对应版本后删除C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA目录下的版本文件
https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_531.14_windows.exe 下载并安装Microsoft C生成工具默认安装即可按需 https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/ 安装cuDNN cuDNN Archive | NVIDIA Developer https://developer.download.nvidia.cn/compute/cudnn/secure/8.9.2/local_installers/12.x/cudnn-windows-x86_64-8.9.2.26_cuda12-archive.zip 安装 PyTorch 查看对应和安装命令 Start Locally | PyTorch 就像不同的Nvidia驱动版本固定搭配不同的CUDA版本一样不同的Torch版本也固定搭配不同的CUDA版本使用。
pip uninstall xformers按y卸载旧版xformers0.17
pip uninstall torch按y卸载旧版torch 2.0.1cu118
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
安装报错一、
ERROR: Exception:
Traceback (most recent call last):File E:\ai\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\urllib3\response.py, line 438, in _error_catcheryieldFile E:\ai\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\urllib3\response.py, line 561, in readdata self._fp_read(amt) if not fp_closed else bFile E:\ai\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\urllib3\response.py, line 527, in _fp_readreturn self._fp.read(amt) if amt is not None else self._fp.read()File E:\ai\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py, line 98, in readdata: bytes self.__fp.read(amt)File C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\http\client.py, line 465, in reads self.fp.read(amt)File C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\socket.py, line 705, in readintoreturn self._sock.recv_into(b)File C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\ssl.py, line 1274, in recv_intoreturn self.read(nbytes, buffer)File C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\ssl.py, line 1130, in readreturn self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out 1、在环镜变量中加python安装目录
2、在python安装目录中复制文件名 pythonw.exe - pythonw3.exe
python.exe - python3.exe 安装xformers 先查看是否有装并查看支持的对应版本 python -m xformers.infopip install xformers 创建并配置Venv虚拟环境和安装PIP包 python -m venv .\venvcd .\venv\Scripts
activate.batpip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
cd ../..pip install -r requirements_versions.txt # 执行此条命令前请检查你的剩余磁盘空间 再次运行上面命令就成功了 修改配置根据自己情况修改 修改配置1、我们下的cu121 所以我改成whl/cu121 如果是就不用改
路径stable-diffusion-webui\modules\launch_utils.py
torch_index_url os.environ.get(TORCH_INDEX_URL, https://download.pytorch.org/whl/cu121)
修改配置2、开放外网访问 set COMMANDLINE_ARGS--listen (加入这个参数 --listen 后面也有空格)
局域网下启动SD的方法
在浏览器里边输入启动SD的那台电脑的IP地址端口即可打开SD使用
例如本机IP为192.168.31.22,根据SD返回的http://0.0.0.0:7860就需要把http://0.0.0.0替换为http://192.168.31.22然后加上端口http://192.168.31.22:7860即可在同一WiFi直接使用SD 安装必要的库 在stable-diffusion-webui目录用webui-user.bat 一直超时报错 cd ./repositories
git clone https://github.com/salesforce/BLIP.git
git clone https://github.com/sczhou/CodeFormer.git
git clone https://github.com/crowsonkb/k-diffusion.git
git clone https://github.com/Stability-AI/generative-models.git
git clone https://github.com/Stability-AI/stablediffusion.git stable-diffusion-stability-ai 如果xformes安装有问题可以下源码后再安装在stable-diffusion-webui目录备用 git clone https://github.com/facebookresearch/xformers.git
cd xformers
git submodule update --init --recursive如果不行也可以用下源码,下下来放对应目录 git clone https://github.com/NVIDIA/cutlass.git third_party/cutlass
git clone https://github.com/Dao-AILab/flash-attention.git third_party/flash-attention
git clone https://github.com/ROCm/composable_kernel.git third_party/composable_kernel_tiled 下载模型
模型 1、官方使用 https://huggingface.co这一超时我使用他的镜像网站 https://hf-mirror.com
https://hf-mirror.com/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors 启动文件配置 #设置python路径 set PYTHONC:\Users\admin\AppData\Local\Programs\Python\Python310\python.exe #设置git的路径 set GITC:\Program Files\Git\bin\git.exe #设置venv文件夹路径 set VENV_DIRE:\ai\stable-diffusion-webui\venv #设置启动参数 注此处的“--medvram”是针对6GB及以上显存的显卡优化的根据显卡配置的不同你还可以更改为“--lowvram”4GB以上、“--lowram”16GB以上或者删除此项无优化) set COMMANDLINE_ARGS--medvram --deepdanbooru --xformers 优化说是能图片生成解析更快 set COMMANDLINE_ARGS--medvram --deepdanbooru --reinstall-xformers --xformers 汉化处理 接着我们会发现WebUI显示的并不是中文。此时我们需要将其调整为简体中文。这里我用百度网盘分享了一些语言的补丁。
链接https://pan.baidu.com/s/1X7R4nQfAxHKdoXRWyknSxg
提取码annx
下载我分享的“localizations.zip”并解压到克隆文件夹的“localizations”目录中。之后在Settings - User interface - Localization (requires restart)设置语言在下拉菜单中选择zh_CN。然后重新启动WebUI之后你就会发现语言变成了简体中文 生成时报错处理 错误1、 openai/clip-vit-large-patch14
OSError: Cant load tokenizer for openai/clip-vit-large-patch14. If you were trying to load it from https://huggingface.co/models, make sure you dont have a local directory with the same name. Otherwise, make sure openai/clip-vit-large-patch14 is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.
安装 openai/clip-vit-large-patch14
当前在 stable-diffusion-webui 目录
mkdir openai
cd openai
git clone https://www.modelscope.cn/AI-ModelScope/clip-vit-large-patch14.git创建目录 openai 进入 opena
错误 2、xformers未安装 查看版本xformers信息
NotImplementedError: No operator found for memory_efficient_attention_forward with inputs:
python -m xformers.infopip install -U xformers --index-url https://download.pytorch.org/whl/cu121 有些资源不好下载的可以去我的百度网盘下,后续有需要再补充
python3.6Git-2.38.1-64-bitcudnn-windows-x86_64-8.9.2.26_cuda12-archivecuda_12.1.1_531.14_windowsDevSidecar-1.7.3
链接https://pan.baidu.com/s/1SZa-uSRDELl8r4SG97puWw 提取码sdai
参数文档
1、最细Stable Diffusion2.1WebUI的安装部署教程非大佬整合包Revirsion - 哔哩哔哩
2、【AI】Stable-Diffusion-WebUI使用指南_stable diffusion webui-CSDN博客
3、Stable Diffusion升级torch2.1.0.devcuda12.1.1cudnn8.9.2.26xforme - 哔哩哔哩