基礎安裝
Step1. 安裝 Python 3.10.6
需勾選 Add Python 3.10 to PATH
Step2. 安裝 Git
Step3. 安裝 Automatic1111
- 使用Git安裝:
先到要放 Stable Diffusion 的資料夾內 → 右鍵 → 使用終端機開啟git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
- 點擊 webui-user.py 繼續安裝
檔案位置: \stable-diffusion-webui\webui-user.py
安裝 Error 排除
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
(沒有GPU)
-
原始 webui-user.bat 檔案內容
@echo off set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS= call webui.bat
-
修改後的 webui-user.bat 檔案內容
@echo off set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--skip-torch-cuda-test call webui.bat
Runtime Error: "addmm_implcup" not implemented for 'Half'
( 安裝完啟動web介面時出現錯誤訊息, 下參數修改,可以解決無獨立顯卡、無Nvidia顯卡的用戶)
-
查詢 Python 安裝路徑
C:\Users\shupa>python >>> import sys >>> print(sys.path)
-
修改後的 webui-user.bat 檔案內容
@echo off set PYTHON=C:\Users\shupa\AppData\Local\Programs\Python\Python310\python.exe set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--no-half --skip-torch-cuda-test git pull call webui.bat
擴充模型
-
SDXL Base Model (新的模型提高品質) (2023-10-31) (約6.94GB)
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
下載 "sd_xl_base_1.0.safetensors"後放在 \stable-diffusion-webui\models\Stable-diffusion -
SDXL Refiner (添加圖片細節)
https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0
下載 "sd_xl_refiner_1.0.safetensors" 後,放在 \stable-diffusion-webui\models\Stable-diffusion -
SDXL VAE (強化圖片色彩) (6.08GB)
https://huggingface.co/stabilityai/sdxl-vae
下載 "" 後,放在