Skip to content

PR #1365 broke importing diffusers #1375

@OrionFive

Description

@OrionFive

Describe the bug

When I try to import diffusers, I get the error below. The file causing the error is from PR #1365, which was merged today.

Reproduction

%cd /content
!git clone -b main  https://github.com/huggingface/diffusers.git
import sys
sys.path.insert(0,'/content/diffusers/src/')
import diffusers

Logs

ImportError                               Traceback (most recent call last)
<ipython-input-2-3ef39c283978> in <module>
     20 import sys
     21 sys.path.insert(0,'/content/diffusers/src/')
---> 22 import diffusers
     23 diffusers.__file__
     24 

5 frames
/content/diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py in <module>
     20 import PIL
     21 from diffusers.utils import is_accelerate_available
---> 22 from transformers import CLIPFeatureExtractor, CLIPVisionModelWithProjection
     23 
     24 from ...models import AutoencoderKL, UNet2DConditionModel

ImportError: cannot import name 'CLIPVisionModelWithProjection' from 'transformers' (/usr/local/lib/python3.7/dist-packages/transformers/__init__.py)

System Info

On a colab notebook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions