硬件準備
物理內(nèi)存:至少16G(8G直接安裝階段就卡死)
N卡:此處我使用GTX 1660 6G (2019年雙12購買)
操作系統(tǒng)
windows 11
軟件準備
網(wǎng)絡(luò)要通暢
git: https://git-scm.com/download/win
Python: https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe
CUDA驅(qū)動:https://developer.nvidia.com/cuda-toolkit-archive
如何查看下載哪個版本的CUDA驅(qū)動?
安裝stable_diffusion_webUI
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多依賴的東西。出現(xiàn)錯誤肯定是網(wǎng)絡(luò)問題。
啟動成功,使用瀏覽器訪問http://127.0.0.1:7860/就能看到UI頁面
為stable-diffusion-webui 添加 ControlNet 支持
-
在此處填寫:https://github.com/Mikubill/sd-webui-controlnet
-
點擊install進行安裝
-
重啟UI
-
安裝模型
https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main
下載后放在:stable-diffusion-webui\extensions\sd-webui-controlnet\models
生成普通二維碼
我們使用該網(wǎng)站生成二維碼:https://34qr.com/en/
使用stable_diffusion_webUI生成藝術(shù)二維碼
- 選擇img2img
- 選擇模型,選擇GhostMix
- 填寫prompt
prompt:
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_v11f1e_sd15_tile
Control Weight: 0.87
Starting Control Step: 0.23
Ending Control Step: 0.9 -
點擊生成
完成配置截圖如下:
效果圖
文章來源:http://www.zghlxwxcb.cn/news/detail-480958.html
Ref
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/
https://www.youtube.com/watch?v=XRNQKjhEcyc文章來源地址http://www.zghlxwxcb.cn/news/detail-480958.html
到了這里,關(guān)于如何使用Stable Diffusion生成藝術(shù)二維碼?的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!