Skip to content
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

T5 load error #18

Open
gassannov opened this issue Sep 9, 2024 · 2 comments
Open

T5 load error #18

gassannov opened this issue Sep 9, 2024 · 2 comments

Comments

@gassannov
Copy link

get this error:
Traceback (most recent call last):
File "/workspace/disk1/gasanov/FluxMusic/sample.py", line 119, in
main(args)
File "/workspace/disk1/gasanov/FluxMusic/sample.py", line 64, in main
t5 = load_t5(device, max_length=256)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/disk1/gasanov/FluxMusic/utils.py", line 9, in load_t5
return HFEmbedder("google/t5-v1_1-xxl", max_length=max_length, torch_dtype=torch.bfloat16).to(device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/disk1/gasanov/FluxMusic/modules/conditioner.py", line 25, in init
self.tokenizer: T5Tokenizer = T5Tokenizer.from_pretrained(local_path_tokenizer, max_length=max_length)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2190, in from_pretrained
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/transformers/utils/hub.py", line 466, in cached_file
raise EnvironmentError(
OSError: Incorrect path_or_model_id: '/maindata/data/shared/multimodal/public/ckpts/stable-diffusion-3-medium-diffusers/tokenizer_3'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

when running:
python sample.py
--version base
--ckpt_path checkpoints/flux-music-base.pt
--prompt_file config/example.txt

@Skquark
Copy link

Skquark commented Sep 10, 2024

I'm getting the exact same error here using same code as examples, and trying to figure out fix. Trace it back to figure out if there's anything we can do, and see in modules/conditioner.py the path is hard coded to an incorrect local directory. When I looked at the same code in the curtified/FluxMusicGUI repo I see that it's using the correct HuggingFace model ID there instead. Looks like an easy update....

@eftSharptooth
Copy link

Yes, this repo has the models currently hardcoded. You can modify the paths yourself, or use the repo that has added the download as mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants