Stable Diffusion のインストールと動作確認.
動作には,Python,PyTorch,NVIDIA CUDA ツールキットが必要.
【目次】
【関連する外部ページ】
AUTOMATIC1111 の stable-diffusion-webui の GitHUb のページ: https://github.com/AUTOMATIC1111/stable-diffusion-webui
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での Python 3.10,関連パッケージ,Python 開発環境のインストール: 別ページ »で説明
【サイト内の関連ページ】
Python のまとめ: 別ページ »にまとめ
【関連する外部ページ】
Python の公式ページ: https://www.python.org/
Windows での Build Tools for Visual Studio 2022,NVIDIA ドライバ,NVIDIA CUDA ツールキット 11.8,NVIDIA cuDNN v8.6 のインストールと動作確認: 別ページ »で説明
【関連する外部ページ】
コマンドプロンプトを管理者として実行: 別ページ »で説明
PyTorch のページ: https://pytorch.org/index.html
次のコマンドは, PyTorch 2.0 (NVIDIA CUDA 11.8 用) をインストールする. 事前に NVIDIA CUDA のバージョンを確認しておくこと(ここでは,NVIDIA CUDA ツールキット 11.8 が前もってインストール済みであるとする).
PyTorch で,GPU が動作している場合には,「torch.cuda.is_available()」により,True が表示される.
python -m pip install -U pip python -m pip install -U torch torchvision torchaudio numpy --index-url https://download.pytorch.org/whl/cu118 python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
AUTOMATIC1111 の stable-diffusion-webui の GitHUb のページ: https://github.com/AUTOMATIC1111/stable-diffusion-webui
コマンドプロンプトを管理者として実行: 別ページ »で説明
cd %HOMEPATH% rmdir /s /q stable-diffusion-webui git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd %HOMEPATH% cd stable-diffusion-webui webui-user.bat
エラーメッセージが出ていないこと.
Web ブラウザで次のページを開き,「sd-v1-4.ckpt」をダウンロード
https://huggingface.co/CompVis/stable-diffusion-v-1-4-original
コマンドプロンプトを管理者として実行: 別ページ »で説明
cd %HOMEPATH% cd stable-diffusion-webui webui-user.bat
AltCLIP の説明
AltCLIP の特徴は, CLIP のテキストエンコーダ (text encoder) を 学習済みの多言語のテキストエンコーダ XLM-R で置き換えたこと.
文献
Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu, AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities, arXiv:2211.06679, 2022.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable-diffusion-20
コマンドプロンプトを管理者として実行: 別ページ »で説明
cd %HOMEPATH% cd stable-diffusion-webui webui-user.bat
日本語でも動くようです.