一、環(huán)境準備
1. 良好的網絡環(huán)境
網絡很重要,安裝會因為超時失敗,我是失敗了很多次才成功
2. 設備
Windows10,N 卡(我的是古早的1070)
二、安裝Stable Diffusion
1 .clone Stable Diffusion 代碼到本地
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
2. 安裝python環(huán)境
- 安裝conda,也可以安裝miniconda
- 進入stable-diffusion-webui目錄
- 創(chuàng)建conda 虛擬環(huán)境
# environment-wsl2.yaml是stable-diffusion-webui下文件
conda env create -p automatic -f D:\stable-diffusion-webui\environment-wsl2.yaml
- 激活conda 環(huán)境
conda activate automatic
- 安裝依賴
pip install -r requirements.txt
- 安裝其他依賴
# 這一步會安裝 GFPGAN 等依賴
webui-user.bat
- 安裝好后終端會顯示服務以運行
Running on local URL: http://127.0.0.1:7860
- 直接訪問域名,以上步驟安裝順利就說明成功了,我的界面如下:
三、測試效果
1. 黑貓,black cat,生成成功 10秒左右
2. 青梅竹馬。10秒
用的是中文,畫的就是拆詞直譯了,感覺跟文心一言有點一拼,哈哈哈
3. 用英文翻譯青梅竹馬:Childhood sweethearts
意思達到了,就是有點丑
4 山水畫,背景是山云,前景是江水,江水上有漁船,漁船上有老翁,船頭站著鸕鶿,5min
Landscape painting: Mountain and clouds as the background, a river as the foreground, with a fishing boat on the river, an old man on the fishing boat, and a cormorant standing on the bow of the boat.
整個畫面很有意境,有云,山有遠近,船很有意思,雖然小細節(jié)不太準,但是整個是很滿意的
5. 調整參數增加steps,加大畫幅,20min
白云,疊山,漁船,飛鳥,甚是有趣
6 來副山水,24 min
水墨畫,背景是山云,前景是江水,江水很長,江水上有漁船,漁船上有老翁,船頭站著鸕鶿
Ink painting: Mountain and clouds as the background, a long river as the foreground, with a fishing boat on the river, an old man on the fishing boat, and a cormorant standing on the bow of the boat.
可能是描述的有問題,但是整體更加準確,船是外國船
7 中國畫,背景是山云,前景是江水,江水很長,江水上有漁船,漁船上有老翁,船頭站著鸕鶿 1h 6min
This is a traditional Chinese painting with a background of mountain and clouds and a foreground of a long river. On the river, there is a fishing boat with an elderly man on board, and at the bow stands a cormorant.
這個效果就差很多,雖然有中國畫的意境,但是還是差強人意
文章來源:http://www.zghlxwxcb.cn/news/detail-486327.html
四、總結
stable difussion 部署很簡單,但是依賴良好的網絡,如果你的網絡很通暢,基本可以解決80%的問題,工具弄好了,想要做好,就要研究玩法了!文章來源地址http://www.zghlxwxcb.cn/news/detail-486327.html
到了這里,關于Stable Diffusion本地部署的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!