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

colab - loading the expressive model. AttributeError: 'Spiritlm' object has no attribute 'is_expressive_model' #20

Open
rowntreerob opened this issue Nov 18, 2024 · 3 comments

Comments

@rowntreerob
Copy link

running in colab, loading model from drive with:

spirit_lm = Spiritlm("/content/drive/MyDrive/data/checkpoints/spiritlm_model/spirit-lm-expressive-7b")

then, running generation step from standard example , it has error below:

image

and the logger has following :
INFO:root:test
INFO:spiritlm.model.spiritlm_model:Loading SPIRIT-LM model from the path /content/drive/MyDrive/data/checkpoints/spiritlm_model/spirit-lm-expressive-7b...
INFO:spiritlm.model.spiritlm_model:SPIRIT-LM model is loaded.
INFO:spiritlm.model.spiritlm_model:Loading SPIRIT-LM speech tokenizers ...
INFO:spiritlm.model.spiritlm_model:SPIRIT-LM speech tokenizers are loaded.
INFO:DET:testRR

@rowntreerob
Copy link
Author

ban_expressivity_tokens=True

without the rest of the "if then" @233 works fine.

@hitchhicker
Copy link
Contributor

Hey @rowntreerob ! Thanks for raising the issue, it is indeed an issue, the variable is_expressive_model is not initialised correctly in here when the model name is a path (in your example "/content/drive/MyDrive/data/checkpoints/spiritlm_model/spirit-lm-expressive-7b"), we can reuse the function _ensure_model_name from here to get correct model name.

You are welcome to create a PR to fix it.

@kingfener
Copy link

kingfener commented Nov 26, 2024

fix file in spiritlm/model/spiritlm_model.py :change 184 and 187:
from : if name ==
to : if os.path.basename(name) ==

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