【GoogleColab】2024/03/14起きているエラー対処法[StableDiffusion]

AI
この記事は約3分で読めます。

2024/04/14

本日(2024/03/14)今現在、Google Colab(グーグルコラボ)上での

TheLastBenで起きているエラーについて。

WebUI上では

NotimplementedError: No operator found for ‘memory_efficient_attention_forward’

と表示されて、

ノートブックのログ上には

WARNING[XFORMERS]: xFormers can’t load C++/CUDA extensions. xFormers was built for:
PyTorch 2.1.0+cu121 with CUDA 1202 (you have 2.2.1+cu121)
Python 3.10.12 (you have 3.10.12)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won’t be available.
Set XFORMERS_MORE_DETAILS=1 for more details

と出ていますので、PyTorchのインストールし直しを実行します。

以下、Connect Google Driveの次にコードを追加します。

#@markdown # Torch ReInstall

!pip install lmdb
!pip install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0 torchtext==0.16.0+cpu torchdata==0.7.0 --index-url https://download.pytorch.org/whl/cu121

これでOKです。
ヴァージョンチェックを行いたい方は次のコードセルにでも

import torch

# PyTorchのバージョンを取得してprint出力する
print("torch Ver:"+torch.__version__)

を追加してみてください。

以上、取り急ぎエラー対処法でしたー。

コメント

タイトルとURLをコピーしました