Stable Diffusion 是一種開源機(jī)器學(xué)習(xí)模型,可以從文本生成圖像,根據(jù)文本修改圖像,或者在低分辨率或低細(xì)節(jié)圖像上填充細(xì)節(jié)。 Stable Diffusion 已經(jīng)過數(shù)十億張圖像的訓(xùn)練,可以產(chǎn)生與從 DALL-E 2 和 MidJourney 獲得的結(jié)果相當(dāng)?shù)慕Y(jié)果。 它由 Stability AI 開發(fā),并于 2022 年 8 月 22 日首次公開發(fā)布。 Stable Diffusion 可以在 windows 電腦上完全免費(fèi)使用。 本文介紹 Stable Diffusion 在 Windows 11 操作系統(tǒng)上的詳細(xì)安裝步驟。
社區(qū)推薦安裝 Python 3.10.6,但筆者安裝的是 3.10.8: 大家可以直接通過這個(gè)鏈接下載 Python. 打開 Stable Diffusion 的 Github 倉庫: 點(diǎn)擊 下載到本地,解壓。 https://huggingface.co/CompVis/stable-diffusion-v-1-4-original 啟動(dòng)日志,會(huì)自動(dòng)下載 耐心等待其下載完畢: 如果啟動(dòng)時(shí)遇到如下錯(cuò)誤消息: File "C:\app\stable-diffusion-webui-master\launch.py", line 355, in prepare_environment() File "C:\app\stable-diffusion-webui-master\launch.py", line 260, in prepare_environment run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'") File "C:\app\stable-diffusion-webui-master\launch.py", line 121, in run_python return run(f'"{python}" -c "{code}"', desc, errdesc) File "C:\app\stable-diffusion-webui-master\launch.py", line 97, in run raise RuntimeError(message) RuntimeError: Error running command. Command: "C:\app\stable-diffusion-webui-master\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'" Error code: 1 stdout: stderr: C:\app\stable-diffusion-webui-master\venv\lib\site-packages\torch\cuda__init__.py:88: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10020). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.) return torch._C._cuda_getDeviceCount() > 0 Traceback (most recent call last): File "", line 1, in AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1742 https://github.com/TencentARC/GFPGAN 按照錯(cuò)誤消息的提示去糾正: 找到了報(bào)這條錯(cuò)誤消息的準(zhǔn)確地址: 啟動(dòng)成功了: |
|