
Stable Diffusion下載安裝

Stable Diffusion下載安裝

Stable Diffusion下載安裝
『Stable Diffusion』開源AI划畫畵程式. 輕易係網络下載,部署係電腦行.
『提示詞』畀『Clip』解讀, 『Diffusion』逐步生成圖像.
| 『提示詞』->『Clip』->『Diffusion』->『VAE』->『畵』 |
硬件要求
- NVIDIA RTX孖2080Ti-組NVLink.
- 固態磁碟吾細於20gb
部署運行環境.
- 『Python下載安装, 必需裝『Python 3.10.6』
- 『git下載安装』
- 『PyTorch下載安裝』
- 『gfpgan』
- 『Clip』
- 『open_clip』
- 『httpx』
- 『transformers』模型分詞器.
- 『torchmetrics』
- 『open-clip-torch』
- 『v1-5-pruned-emaonly.safetensors』
- 『Stable Diffusion模型下載』
部署Stable Diffusion
- 撳『Win+r』填cmd
- 碟符『c:』撳『enter』
- 撳『.』入『c:』碟根
- 『GIT』克隆『Stable Diffusion』, 填下面克隆碼.
| git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui |
- 等待克隆结束, 出現100%-done
- 吾对下載『stable-diffusion-webui-1.0.0-pre.zip』版本過舊.
- 复制『exe』路徑,『Stable Diffusion』自動复制python. 非『Python 3.10.6』唔匹配.
| “C:\Program Files\Python310\python.exe” |
- 以記事本编輯『C:\stable-diffusion-webui\webui-user.bat』
- 编輯『webui-user.bat』
| @echo off |
| set PYTHON=”C:\Program Files\Python310\python.exe” |
| set GIT= |
| set VENV_DIR= |
| set COMMANDLINE_ARGS=–xformers |
| call webui.bat |
- 刪『C:\stable-diffusion-webui\venv』資料夾.
- 執行『C:\stable-diffusion-webui\webui-user.bat』.
- 非『Python 3.10.6』唔匹配.
| ERROR:Could not find a version that satisfies the requirement torch |
| ERROR:NO matching distribution found for torch |
- 檢查最新版pip時出錯.
| WARNING:There was an error checking the latest version of pip. |
- 手動升級pip至最新版.
| python -m pip install –upgrade pip |
| C:\stable-diffusion-webui\venv\Scripts\python.exe -m pip install –upgrade pip |
- PyTorch未稳到gpu
| RuntimeError: Torch is not able to use GPU; add –skip-torch-cude-test to COMMANDLINE_ARGS variable to disable this check |
- 跳過gpu檢測, 編輯『webui-user.bat』.
| set COMMANDLINE_ARGS=–xformers –skip-torch-cuda-test |
- 未有裝gfpgan
| RuntimeError: Couldn’t install gfpgan. |
- 未有裝Clip
| RuntimeError: Couldn’t install clip. |
- 未有裝open_clip
| RuntimeError: Couldn’t install open_clip. |
- 未有裝『transformers』模型分詞器.
| OSError: Can’t load tokenizer for ‘openai/clip-vit-large-patch14’. If you were trying to load it from ‘https://huggingface.co/models’, make sure you don’t have a local directory with the same name. Otherwise, make sure ‘openai/clip-vit-large-patch14’ is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer. |
- 未有裝httpx
| TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument ‘socket_options’ |
- 未有裝torchmetrics
| ImportError: cannot import name ‘_compare_version’ from ‘torchmetrics.utilities.imports’ (C:\stable-diffusion-webui\venv\lib\site-packages\torchmetrics\utilities\imports.py) |
- 『Stable Diffusion』冇自带模型.需自行下載.
| Downloading: “https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors” to C:\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors |
- 若中斷可刪『venv』重构
| C:\stable-diffusion-webui\venv |
- 當妳睇到『http://127.0.0.1:7860』網頁,証明掂左, 『Stable Diffusion』奉行『輵』『殼』分离哲學. 『http://127.0.0.1:7860』係『殼』, 『殼』崩潰吾會會影影響『輵』.
| Running on local URL: http://127.0.0.1:7860 |
No Responses