cloneofsimo / lora

Using Low-rank adaptation to quickly fine-tune diffusion models.
https://arxiv.org/abs/2106.09685
Apache License 2.0
7.03k stars 480 forks source link

ImportError: cannot import name 'CLIPTextModelWithProjection' from 'transformers' #134

Closed GongXinyuu closed 1 year ago

GongXinyuu commented 1 year ago

Hello, thanks for your great work!

However, I met such an error when I tried to from lora_diffusion import patch_pipe, tune_lora_scale.

The error message is ImportError: cannot import name 'CLIPTextModelWithProjection' from 'transformers'. Coudl you help to check on this? Thanks.

ethansmith2000 commented 1 year ago

CLIPTextModelWithProjection is one of the newest additions to the Transformers library, I've typically had that issue when using a version that is <4.25.1

cloneofsimo commented 1 year ago

Awesome.