1. 參考:
How To Run Stable Diffusion 2.0 On Your Local PC — No Code Guide
https://luminous-mapusaurus-1aa.notion.site/Stable-Diffusion-ce61d77468644806ab03a780f670df51
stable-diffusion-webui 安裝_w3cschool
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
2. 安裝步驟
2.1 conda換源
為了讓conda執(zhí)行下載指令加速,需要對conda換源操作,即將源由國外原始源,改為國內(nèi)源;
Windows 用戶無法直接創(chuàng)建名為 .condarc 的文件,可先執(zhí)行 conda config --set show_channel_urls yes 生成該文件之后再修改。
.condarc文件編輯如下:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true
2.2 安裝pytorch
注意如果需要pytorch, 還需要添加pytorch的鏡像
$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
$ conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
https://luminous-mapusaurus-1aa.notion.site/Stable-Diffusion-ce61d77468644806ab03a780f670df51
2.3 安裝python 3.10.6虛擬開發(fā)環(huán)境
$conda create --name python3106_sd2 python=3.10.6
...
#
# To activate this environment, use
#
# $ conda activate python3106_sd2
#
# To deactivate an active environment, use
#
# $ conda deactivate
2.4 pip安裝依賴庫
$pip install -r requirements_versions.txt # 執(zhí)行此條命令前,請檢查你的剩余磁盤空間
2.5 執(zhí)行批處理
.\webui-user.bat
3. FAQ
3.1 got an unexpected keyword argument ‘personalization_config’
參考:
https://github.com/XavierXiao/Dreambooth-Stable-Diffusion/issues/92
[Fixed]
re-use pip install -e . work for me.
3.2 RuntimeError: CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 12.00 GiB total capacity; 8.31 GiB already allocated; 1012.77 MiB free; 8.49 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
參考:
https://stackoverflow.com/questions/73747731/runtimeerror-cuda-out-of-memory-how-setting-max-split-size-mb
https://huggingface.co/spaces/stabilityai/stable-diffusion/discussions/21
[fixed]
try using --W 256 --H 256 as part your prompt.
3.3 AttributeError: module ‘signal’ has no attribute ‘SIGUSR1’
[fixed]
https://github.com/rinongal/textual_inversion/issues/12
7.4 NameError: name ‘trainer’ is not defined文章來源:http://www.zghlxwxcb.cn/news/detail-521946.html
參考:
https://github.com/rinongal/textual_inversion/issues/84文章來源地址http://www.zghlxwxcb.cn/news/detail-521946.html
到了這里,關于本地部署StableDiffusion WebUI的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!