LoginSignup
0
1

cannot import name 'PaliGemmaForConditionalGeneration' from 'transformers' と出た場合の解決方法

Last updated at Posted at 2024-05-15

Googleの最新のPaliGemmaを使おうとして、ちょっと困ったので、記事を書きました。
実行環境はUbuntu 20.04環境下のPython 3.11.4、NVIDIA RTX 3090、64GB RAMです。

ImportError: cannot import name 'PaliGemmaForConditionalGeneration' from 'transformers'

と出た場合の解決方法を見つけましたので、シェアします。

pip install git+https://github.com/huggingface/transformers.git

とすれば大丈夫です。どうやらHuggingFaceの最新のtranformersをインストールすれば良いみたいですね。(pipで普通にアップデートしてもPaliGemmaForConditionalGenerationがないと言われた)

参考文献:https://note.com/npaka/n/n1afc8f64e447

加藤 翼
株式会社インスパイアサーチ
代表取締役

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