1
3

More than 1 year has passed since last update.

Stable Diffusion AUTOMATIC1111のアップデートでエラーが出た件

Last updated at Posted at 2022-12-25

Stable Diffusionの更新が無いかGithubを見に行ったら、更新されているようでした。

git pull

と実行しようとしたら、下記のエラーが出ました。

PS E:\stable-diffusion-webui> git pull
remote: Enumerating objects: 438, done.
remote: Counting objects: 100% (287/287), done.
remote: Total 438 (delta 287), reused 287 (delta 287), pack-reused 151
4.00 KiB/s, done.

Resolving deltas: 100% (297/297), completed with 69 local objects.
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
   685f963..c6f347b  master            -> origin/master
 * [new branch]      camenduru-patch-1 -> origin/camenduru-patch-1
error: Your local changes to the following files would be overwritten by merge:
        modules/safety.py
Please commit your changes or stash them before you merge.
Aborting
Updating 8504db5..c6f347b

そのため検索したら、Githubに回答がありました。

実行したら、このエラーが出ました。

No module 'xformers'. Proceeding without it.

Gigthubで、やり取りがありました。

私は、Windowsで使っていますので、このエラーは仕方ないと思うしかなさそうな感じです。
ざっと読んだらPythonのバージョンを変えて試した人も居たようです。
でも、一応ChatGPTに、質問してみました。
そうしたら、このような回答を得ました。

ChatGPTの回答
It looks like you are using Stable Diffusion AUTOMATIC1111 on a Windows system, and you are encountering an error message that says "No module 'xformers'. Proceeding without it."

This error message suggests that the python module "xformers" is not installed on your system, or that it is not being recognized by the python interpreter. Without this module, certain features of Stable Diffusion AUTOMATIC1111 may not be available.

To fix this issue, you will need to install the "xformers" module. You can do this by using the Python package manager pip. Open a command prompt or terminal window, and enter the following command:

pip install xformers

This will install the "xformers" module and make it available to the python interpreter. Once the module is installed, you should no longer see the error message when using Stable Diffusion AUTOMATIC1111.

If you continue to have problems with the "xformers" module, you may want to try installing it using a different method, such as by downloading and installing the package from the Python Package Index (PyPI) or by installing it from the source code. You may also want to check for any dependencies that are required for the module to work properly.
試しに
pip install xformers

とStable Diffusionをインストールしたフォルダで、Shifキーを押しながら右クリックします。
PowerShellをここで開くがメニューにあるので、選択しました。
そして上記のコマンドを実行して、インストールしました。

起動して見ましたが、改善しませんでした。

それで、下記の記事を試しました。

venv "E:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: *********
Installing xformers
Installing requirements for Web UI
Launching Web UI with arguments: --xformers
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [7460a6fa] from E:\stable-diffusion-webui\models\Stable-diffusion\sd-v1-4.ckpt
Applying xformers cross attention optimization.
Model loaded.
Loaded a total of 0 textual inversion embeddings.
Embeddings:
Running on local URL:  http://hoge:****

と表示されて、起動できました。
01032-1019632470-Consumer. Image. Christmas cake. Coffee. Coffee Shop.png
と画像出ましたので、大丈夫だと思います。

1
3
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
1
3