!curl -Lo memfix.zip <https://github.com/nolanaatama/sd-webui/raw/main/memfix.zip>
!unzip /content/memfix.zip
!apt install -qq libunwind8-dev
!dpkg -i *.deb
%env LD_PRELOAD=libtcmalloc.so
!rm *
!pip install --upgrade fastapi==0.90.1
!pip install torchmetrics==0.11.4 torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchtext==0.14.1 torchaudio==0.13.1 torchdata==0.5.1 --extra-index-url <https://download.pytorch.org/whl/cu117>
!curl -Lo sd-webui.zip <https://huggingface.co/nolanaatama/webui/resolve/main/sd-webui.zip>
!unzip /content/sd-webui.zip
!git clone <https://github.com/nolanaatama/sd-webui-tunnels> /content/sd-webui/extensions/sd-webui-tunnels
!git clone <https://github.com/Mikubill/sd-webui-controlnet> /content/sd-webui/extensions/sd-webui-controlnet
!git clone <https://github.com/hnmr293/posex> /content/sd-webui/extensions/posex
## -- ↓↓↓ ここから ↓↓↓ sd-dynamic-promptingを"extensions"フォルダーに追加する
!git clone <https://github.com/adieyal/sd-dynamic-prompting/> /content/sd-webui/extensions/dynamic-prompts
## -- ↑↑↑ ここまで ↑↑↑
!curl -Lo /content/sd-webui/extensions/sd-webui-images-browser.zip <https://huggingface.co/nolanaatama/webui/resolve/main/sd-webui-images-browser.zip>
%cd /content/sd-webui/extensions
!unzip /content/sd-webui/extensions/sd-webui-images-browser.zip
%cd /content

## モデル:BRA4/BRA5を追加
!curl -Lo /content/sd-webui/models/Stable-diffusion/braBeautifulRealistic_v40.safetensors <https://civitai.com/api/download/models/51395>
!curl -Lo /content/sd-webui/models/Stable-diffusion/braBeautifulRealistic_v50.safetensors <https://huggingface.co/BanKaiPls/AsianModel/resolve/main/BRAV5finalfp16.safetensors>
!curl -Lo /content/sd-webui/embeddings/euDNFnStFsdoJUEbKe5u7xzZ.zip <https://downloads.fanbox.cc/files/post/5775230/euDNFnStFsdoJUEbKe5u7xzZ.zip>
!unzip /content/sd-webui/embeddings/euDNFnStFsdoJUEbKe5u7xzZ.zip -d /content/sd-webui/embeddings/
!rm -rf /content/sd-webui/embeddings/euDNFnStFsdoJUEbKe5u7xzZ.zip

## vaeを追加
!curl -Lo /content/sd-webui/models/VAE/vae-ft-ema-560000-ema-pruned.ckpt <https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt>
import shutil
shutil.rmtree('/content/sd-webui/embeddings')
!rm sd-webui.zip
!rm sd-webui-images-browser.zip
%cd /content/sd-webui
!git clone <https://huggingface.co/nolanaatama/embeddings>
%cd /content/sd-webui/models
!git clone <https://huggingface.co/nolanaatama/ESRGAN>
%cd /content/sd-webui
!COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --reinstall-xformers --enable-insecure-extension --gradio-queue --remotemoe" REQS_FILE="requirements.txt" python launch.py

プロンプト

1girl, ({white|pink|black} T-shirt), ({short | long} {pink | blue} hair)

指定方法

{} の中に、パターンを入れる、例:{赤|青}()の中は優先される、数式と同じ 2 * (1 + 3) → 2 * 4 → 8 2 * 1 + 3 → 2 + 3 → 6

({white|pink|black} T-shirt) → 白のTシャツ、ピンクのTシャツ、黒のTシャツ

({short | long} {pink | blue} hair) → ショートのピンク、ロングのピンク、ショートの青、ロングの青