stable-diffusion
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| stable-diffusion [2025/02/21 00:04] – [Make conda environment] jianwu | stable-diffusion [2025/02/25 05:09] (current) – jianwu | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{navi> | + | [[https:// |
| - | < | + | |
| - | < | + | |
| - | .dokuwiki { | + | |
| - | font-size: 1.200em; | + | |
| - | } | + | |
| - | </ | + | |
| - | </ | + | |
| ====== Stable Diffusion Version 2 - Run locally. Abandon if this doesn' | ====== Stable Diffusion Version 2 - Run locally. Abandon if this doesn' | ||
| Line 130: | Line 123: | ||
| and maybe followings are needed. | and maybe followings are needed. | ||
| <code Bash> | <code Bash> | ||
| - | conda config --append channels conda-forge | + | > conda config --append channels conda-forge |
| - | conda config --append channels nvidia | + | > conda config --append channels nvidia |
| </ | </ | ||
| Line 140: | Line 133: | ||
| === installing stablediffusion === | === installing stablediffusion === | ||
| installing stablediffusion using requirements.txt | installing stablediffusion using requirements.txt | ||
| - | < | + | < |
| (webui_env) E:\> mkdir stable_diffusion | (webui_env) E:\> mkdir stable_diffusion | ||
| (webui_env) E:\> cd stable_diffusion | (webui_env) E:\> cd stable_diffusion | ||
| Line 148: | Line 141: | ||
| </ | </ | ||
| - | <note important> | + | |
| - | [IMPORTANT]\\ | + | :!: if you got following error |
| - | if you got following error | + | |
| ... | ... | ||
| running build_rust | running build_rust | ||
| Line 157: | Line 149: | ||
| You need to Install Rust from | You need to Install Rust from | ||
| [[https:// | [[https:// | ||
| - | </ | ||
| === Installing NVIDIA CUDA Toolkit === | === Installing NVIDIA CUDA Toolkit === | ||
| Line 168: | Line 159: | ||
| and execute following command | and execute following command | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| </ | </ | ||
| Line 187: | Line 178: | ||
| It says | It says | ||
| - | < | + | < |
| - | pip3 install --pre torch torchvision torchaudio --index-url https:// | + | > pip3 install --pre torch torchvision torchaudio --index-url https:// |
| </ | </ | ||
| But we execute more precisely, | But we execute more precisely, | ||
| Line 194: | Line 185: | ||
| (webui_env) E: | (webui_env) E: | ||
| </ | </ | ||
| - | <note important> | + | :!: This is one of the most important checkpoints. At this point torch.cuda should be available. Check it! |
| - | [IMPORTANT]\\ | + | < |
| - | This is one of the most important checkpoints. | + | |
| - | At this point torch.cuda should be available. | + | |
| - | Check it! | + | |
| - | </ | + | |
| - | < | + | |
| (webui_env) E: | (webui_env) E: | ||
| >>> | >>> | ||
| Line 210: | Line 196: | ||
| </ | </ | ||
| for reference | for reference | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| open-clip-torch | open-clip-torch | ||
| Line 221: | Line 207: | ||
| === Installing xFormers === | === Installing xFormers === | ||
| - | < | + | :!: You don't need to do this, if you only use with webui. |
| - | You don't need to do this, if you only use with webui. | + | < |
| - | </ | + | |
| - | < | + | |
| (webui_env) E: | (webui_env) E: | ||
| Successfully installed xformers-0.0.22+cfad52d.d2023090 | Successfully installed xformers-0.0.22+cfad52d.d2023090 | ||
| Line 231: | Line 215: | ||
| === Installing diffusers === | === Installing diffusers === | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| Successfully uninstalled transformers-4.19.2 | Successfully uninstalled transformers-4.19.2 | ||
| Line 249: | Line 233: | ||
| download '' | download '' | ||
| from [[https:// | from [[https:// | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| </ | </ | ||
| - | <note warning> | + | :!: txt2img.py makes 9 images. So it takes so much time and large memory. [[stable-diffusion# |
| - | [WARNING] | + | |
| - | txt2img.py makes 9 images. So it takes so much time and large memory. [[stable-diffusion# | + | |
| - | </ | + | |
| === scripts/ | === scripts/ | ||
| we need to download [[https:// | we need to download [[https:// | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| outputs/ | outputs/ | ||
| Line 270: | Line 251: | ||
| [[https:// | [[https:// | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| (webui_env) E: | (webui_env) E: | ||
| Line 280: | Line 261: | ||
| '' | '' | ||
| - | < | + | < |
| @echo off | @echo off | ||
| Line 291: | Line 272: | ||
| call webui.bat | call webui.bat | ||
| </ | </ | ||
| - | <note important> | + | :!: We need to install xformers for webui.And It should be 0.0.20 not 0.0.22 at current condition. |
| - | [IMPORTANT] | + | |
| - | We need to install xformers for webui.And It should be 0.0.20 not 0.0.22 at current condition. | + | |
| - | </ | + | |
| then execute '' | then execute '' | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| Running on local URL: http:// | Running on local URL: http:// | ||
| Line 308: | Line 286: | ||
| for reference | for reference | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| >>> | >>> | ||
| Line 317: | Line 295: | ||
| >>> | >>> | ||
| </ | </ | ||
| - | < | + | < |
| (webui_env) E: | (webui_env) E: | ||
| open-clip-torch | open-clip-torch | ||
| Line 330: | Line 308: | ||
| followings are checked by programs | followings are checked by programs | ||
| - | < | + | < |
| CUDA_HOME = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2 | CUDA_HOME = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2 | ||
| CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | ||
| Line 338: | Line 316: | ||
| </ | </ | ||
| maybe not correnponding | maybe not correnponding | ||
| - | < | + | < |
| CUDA_PATH_V11_8 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | CUDA_PATH_V11_8 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | ||
| CUDA_PATH_V12_2 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2 | CUDA_PATH_V12_2 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2 | ||
| Line 360: | Line 338: | ||
| </ | </ | ||
| - | < | + | :!: About '' |
| - | About '' | + | |
| '' | '' | ||
| Line 370: | Line 347: | ||
| That can ensure the feasibility of running large images while maximizing performance. | That can ensure the feasibility of running large images while maximizing performance. | ||
| - | </ | ||
| ==== venv folder ==== | ==== venv folder ==== | ||
| If you change some environments and use the same directory, you should delete the '' | If you change some environments and use the same directory, you should delete the '' | ||
| - | < | + | < |
| stable-diffusion-webui\venv | stable-diffusion-webui\venv | ||
| </ | </ | ||
stable-diffusion.1740063885.txt.gz · Last modified: 2025/02/21 00:04 by jianwu