1. 環(huán)境創(chuàng)建
-
創(chuàng)建虛擬環(huán)境
conda create -n env_stable python==3.10.0
-
進(jìn)入虛擬環(huán)境
conda activate env_stable
-
clone源碼
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
-
進(jìn)入項目根目錄
cd stable-diffusion-webui
-
安裝相關(guān)庫
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
2. 安裝依賴庫
-
安裝依賴倉庫
- 存放目錄為:
stable-diffusion-webui/repositories/
- 存放目錄為:
-
clone源碼
cd stable-diffusion-webui/repositories git clone https://github.com/salesforce/BLIP.git git clone https://github.com/sczhou/CodeFormer.git git clone https://github.com/Stability-AI/generative-models.git git clone https://github.com/crowsonkb/k-diffusion.git git clone https://github.com/Stability-AI/stablediffusion.git git clone https://github.com/CompVis/taming-transformers.git
3.下載底模
-
下載模型連接:https://civitai.com/models
- 想要那個類型的底模下載那個即可
- 想要那個類型的底模下載那個即可
-
底模存放路徑:
stable-diffusion-webui/models/Stable-diffusion
文章來源:http://www.zghlxwxcb.cn/news/detail-717598.html
4. 獲取lora參數(shù)文件
- 將微調(diào)的模型參數(shù)放置在:
stable-diffusion-webui/models/Lora
5.運(yùn)行代碼
- 運(yùn)行命令
# python webui.py --listen --enable-insecure-extension-access --xformers --no-half-vae --disable-nan-check --no-half python webui.py --listen --enable-insecure-extension-access --xformers --no-half-vae
文章來源地址http://www.zghlxwxcb.cn/news/detail-717598.html
6. 報錯信息
報錯1
-
keyError:'Stable Diffusion XL
- 原因:依賴庫缺失,要把
步驟2
的依賴庫全部下載下來
- 原因:依賴庫缺失,要把
報錯2
-
pydantic相關(guān)文件報錯
- 解決:版本問題,安裝
1.10.11
版本pip install pydantic==1.10.11
到了這里,關(guān)于stable-diffusion-webui環(huán)境部署的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!