0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Stable Diffusion WebUI Docker で InvokeAI と ComfyUI を起動する

Last updated at Posted at 2023-08-13

2024年6月現在、筆者は以下のエラーによりStableDiffusion WebUI Docker は起動ができなくなり、Docker版ではないWebUIを利用しています。

No device found
または
Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 500: named symbol not found: str

前置き

Stable Diffusion WebUI(AUTOMATIC1111) のDockerでのインストール方法は以下のサイトを参考にしてできた。
https://zenn.dev/isi00141/articles/2fc745b11e8796

インストールする本体のgithubサイトを見に行くと、AUTOMATIC1111 の StableDiffusionWebUI だけでなく、InvokeAI と ComfyUI も導入できるらしい。

環境
・Windows11Pro
・GPU NVIDIA GeForce RTX 3060 12G
・CPU Intel(R)Core(TM) i7-13700 2.10GHz
・RAM 32GB

HowTo

こちらにある通り、AUTOMATIC1111版を起動した際の "auto" のところを変更して実行する。

ComfyUI

ComfyUIは単純に以下で実行できた。

docker compose --profile comfy up --build

InvokeAI

InvokeAIも実行するが、以下のようにエラーになった。

docker compose --profile invoke up --build
...
webui-docker-invoke-1  | ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (/opt/conda/lib/python3.10/site-packages/torchmetrics/utilities/imports.py)
webui-docker-invoke-1 exited with code 1

これはtorchmetricsのバージョンに関する問題のよう。invoke\Dockerfileに1行追加した。

\stable-diffusion-webui-docker\services\invoke\Dockerfile
WORKDIR ${ROOT}

+ RUN pip install torchmetrics==0.11.4

RUN --mount=type=cache,target=/root/.cache/pip \
  git reset --hard f3b2e02921927d9317255b1c3811f47bd40a2bf9 && \
  pip install -e .

これで実行できた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?