🖼️
Jetson AGX Orin で AI画像を生成する
Stable Diffusion web UI をインストールする
PyTorch のインストールには https://pypi.jetson-ai-lab.dev/jp6/cu126
を使用します。もし https://download.pytorch.org/whl/cu126
を使うと GPU を有効にできません。
ログインアカウントの username:password
部分は書き換えてください。
$ sudo apt -y install python3-venv google-perftools
$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
$ cd stable-diffusion-webui
$ python -m venv venv
$ ./venv/bin/pip install torch torchvision torchaudio xformers --index-url https://pypi.jetson-ai-lab.dev/jp6/cu126
$ echo username:password > htpasswd
$ ./webui.sh --xformers --listen --gradio-auth-path ./htpasswd
学習モデルをダウンロードする
今回は XXMix_9realistic を利用します。
$ cd stable-diffusion-webui/models/Stable-diffusion
$ wget -O XXMix_9realistic.safetensors https://civitai.com/api/download/models/102222
実行する
$ ./webui.sh --xformers --listen --gradio-auth-path ./htpasswd
ウェブブラウザからポート 7860 にアクセスするとログイン画面が表示されます。
Discussion