LoginSignup
0
0

macでstable-diffusion-webuiを実行しようとして ERROR: python3-venv is not installed, aborting...

Posted at

環境

pythonのバージョンはpyenvで管理している

$ pyenv versions
 system
  3.10.11
* 3.11.4

原因

repoにあるwebui-macos-env.sh

webui-macos-env.sh
python_cmd="python3.10"

と記載されているが、
python3.10がインストールされていなかった。

解決策

かといってpyenvでバージョン管理している以上brewでpython3.10をインストールしたくはない。
なのでバージョン指定部分を削除してpyenvのglobalを参照するように修正。

webui-macos-env.sh
python_cmd="python"

これでインストールがうまく行った。

おまけ 実行エラー

画像生成してみようとしたら以下のエラーが発生

modules.devices.NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try se
tting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

以下のサイトを参考に、COMMANDLINE_ARGSを修正したら無事生成できるようになった。
https://soroban.highreso.jp/article/article-037

webui-macos-env.sh
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --no-half"

最後に--no-half追加しただけ

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