huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
26.1k stars 5.38k forks source link

AttributeError: module transformers has no attribute CLIPImageProcessor #3816

Closed carlthome closed 1 year ago

carlthome commented 1 year ago

Describe the bug

Getting AttributeError: module transformers has no attribute CLIPImageProcessor with code that used to work six months ago. No changes on my end as far as I know.

Reproduction

git clone git@github.com:carlthome/stable-diffusion.git
cd stable-diffusion
pip install -r requirements.txt
python main.py

Logs

device=device(type='cuda')
Fetching 19 files: 100%|███████████████████████████████████████████████████████████████| 19/19 [00:00<00:00, 32930.49it/s]
ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy.
Traceback (most recent call last):
  File "/home/carl/Repos/carlthome/stable-diffusion/main.py", line 12, in <module>
    pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
  File "/home/carl/Repos/carlthome/stable-diffusion/.direnv/python-3.10.11/lib/python3.10/site-packages/diffusers/pipeline_utils.py", line 582, in from_pretrained
    class_obj = getattr(library, class_name)
  File "/home/carl/Repos/carlthome/stable-diffusion/.direnv/python-3.10.11/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1069, in __getattr__
    raise AttributeError(f"module {self.__name__} has no attribute {name}")
AttributeError: module transformers has no attribute CLIPImageProcessor

System Info

Who can help?

No response

patrickvonplaten commented 1 year ago

Hey @carlthome,

We cannot maintain repos building on top of diffusers such as git clone git@github.com:carlthome/stable-diffusion.git => Could you try to add a reproducible code snippet that just depends on diffusers ?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.