實體記憶體:至少16G(8G直接安裝階段就卡死)
N卡:此處我使用GTX 1660 6G (2019年雙12購買)
windows 11
網路要通暢
git: https://git-scm.com/download/win
Python: https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe
CUDA驅動:https://developer.nvidia.com/cuda-toolkit-archive
如何檢視下載哪個版本的CUDA驅動?
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt
https://civitai.com/models/6424/chilloutmix
https://civitai.com/models/36520/ghostmix
下載完成後,放在 stable-diffusion-webui\models\Stable-diffusion 目錄下
stable-diffusion-webui\webui-user.bat
set COMMANDLINE_ARGS=--lowvram --precision full --no-half --disable-nan-check
執行 stable-diffusion-webui\webui.bat
第一次啟動會非常的耗時,因為要下載N多依賴的東西。出現錯誤肯定是網路問題。
啟動成功,使用瀏覽器存取http://127.0.0.1:7860/就能看到UI頁面
點選install進行安裝
重啟UI
安裝模型
https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main
下載後放在:stable-diffusion-webui\extensions\sd-webui-controlnet\models
我們使用該網站生成二維條碼:https://34qr.com/en/
a cubism painting of a town with a lot of houses in the snow with a sky background, Andreas Rocha, matte painting concept art, a detailed matte painting
negative prompt:
ugly, disfigured, low quality, blurry, nsfw
上傳二維條碼
設定
Resize mode: Just resize
Sampling method: DPM++2M Karras
Sampling step: 50
Width: 768
Height: 768
CFG Scale: 7
Denoising strength: 0.75
ControlNet中上傳二維條碼
設定
Enable: Yes
Control Type: Tile
Preprocessor: tile_resample
Model: control_xxx_tile
Control Weight: 0.87
Starting Control Step: 0.23
Ending Control Step: 0.9
點選生成
完成設定截圖如下:
https://zhuanlan.zhihu.com/p/617997179
https://stable-diffusion-art.com/qr-code/
https://www.kombitz.com/2023/02/18/how-to-use-controlnet-with-automatic1111-stable-diffusion-web-ui/