Tips/GenerativeAI/Stable Diffusion WebUI のバックアップソース(No.5)

#contents
----
* 概要 [#ff9346f0]
- StableDiffusionをローカル実行できる
- 最新の拡張なども積極的に取り込まれている
* 導入 [#e9b7bfe2]
- dockerリポジトリのclone
#geshi(bash){{
git clone https://github.com/AbdBarho/stable-diffusion-webui-docker.git
}}

- 起動オプションの変更

-- docker-compose.yml
#geshi{{
  auto: &automatic
    <<: *base_service
    profiles: ["auto"]
    build: ./services/AUTOMATIC1111
    image: sd-auto:51
    environment:
      - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api <追加起動オプション>
      <追加オプション>
}}

-- 追加起動オプション
|オプション|概要|h
|--xformers|xformersを使用することで高速化&メモリ消費を低減|
|--xformers-flash-attention|promptの選別を行い、低重要度なものを除外し高速化&メモリ消費を低減|
|--medvram|遅くなるがVRAM使用率を下げる|
|--lowvram|遅くなるが更にVRAM使用率を下げる|
|--theme dark|UIテーマをダークテーマにする|

-- 追加オプション
|オプション|概要|h
|- TZ=Asia/Tokyo|ログやファイル名のタイムゾーンを日本時刻にする|

- dockerイメージのビルド
#geshi(bash){{
docker compose --profile download up --build
}}

- dockerイメージの起動
#geshi(bash){{
docker compose --profile auto up --build
}}

- アクセス
http://localhost:7860 にアクセスする

** 参照リンク [#d88e8a86]
- [[stable-diffusion-webui>https://github.com/AUTOMATIC1111/stable-diffusion-webui]]
--[[Command Line Arguments and Settings>https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings]]
- [[stable-diffusion-webui-docker>https://github.com/AbdBarho/stable-diffusion-webui-docker]]
* 使い方 [#oc18e0ff]
* Tips [#jefd1053]
* 参考リンク [#l7343052]