-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
name 'PreTrainedTokenizer' is not defined in diffusers 0.22.1 #5661
Comments
Similar error when importing anything from diffusers.models:
|
ohh sorry I'm not able to reproduce this error cc @sayakpaul maybe |
Same here. Can't import any model on the latest release. Gonna try reverting back to older releases, but something like this should have probably been caught by the tests :-) |
FYI, the problem is NOT present in version 0.21.4, so reverting to that fixes the problem for now. |
Installing transformers should fix the issue as of now. But I will investigate more deeply. Cc: @DN6 |
This is indeed quite weird. We have a dedicated workflow just for checking if the pipelines can be imported correctly: https://github.com/huggingface/diffusers/blob/main/.github/workflows/pr_dependency_test.yml It actually errors out, too, when using the latest diffusers release: But ... on my Mac, locally, it doesn't error out. I, of course, tested it in a fresh environment with For now, I have opened up #5668, and here's where you can find a test that it is working: @giacomov @WiNE-iNEFF @kremHabashy could y'all please check on your ends too? Many thanks! |
Installing Running on Google Collab environment. |
Does installing from #5668 branch resolve it? If not, could you provide a reproducible Colab? |
Describe the bug
when i try to loading pretrained model using DDPMPipeline or DiffusionPipeline, i take error
Failed to import diffusers.models.unet_2d because of the following error (look up to see its traceback): name 'PreTrainedTokenizer' is not defined
Reproduction
from diffusers import DiffusionPipeline image_pipe = DiffusionPipeline.from_pretrained(huggan/fastgan-few-shot-painting).to(device)
Logs
System Info
-
diffusers` version: 0.22.1Who can help?
@DN6 @yiyixuxu @sayakpaul @patrickvonplaten
The text was updated successfully, but these errors were encountered: