-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SD3 - data did not match any variant of untagged enum PyPreTokenizerTypeWrapper #8495
Comments
hi can you try install /upgrade accelerate? pip install --upgrade accelerate |
I have same problem. |
Hello, I also have this problem, have you solved this issue? |
I solved this problem by updating the transformers. Hope this helps you. |
what was your transformer version? cc @sayakpaul here - we might need to pin a newer version for transformer |
@yiyixuxu I updated the transformers from 4.37.2 to 4.41.2, it may be related to the tokenizers package. |
Thanks for reporting and for the information. Could you try with the latest version of |
Fixed by: pip install --upgrade accelerate |
Describe the bug
Error while execution of demo code:
Traceback (most recent call last):
File "/Users/fp/Library/CloudStorage/OneDrive-Personal/1. Projekte/Code/Adobe StableDiffusion/mlx/mydiffusers.py", line 34, in
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16 , use_auth_token="")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 881, in from_pretrained
loaded_sub_model = load_sub_model(
^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 703, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1825, in from_pretrained
return cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1988, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 133, in init
super().init(
File "/Users/fp/.pyenv/versions/3.11.9/lib/python3.11/site-packages/transformers/tokenization_utils_fast.py", line 111, in init
fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: data did not match any variant of untagged enum PyPreTokenizerTypeWrapper at line 960 column 3
Reproduction
import torch
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16 , use_auth_token="")
pipe = pipe.to("mps")
image = pipe(
"A cat holding a sign that says hello world",
negative_prompt="",
num_inference_steps=28,
guidance_scale=7.0,
).images[0]
image
Logs
No response
System Info
Latest source pull
Macbook M1 Pro
Who can help?
No response
The text was updated successfully, but these errors were encountered: