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

02_diffusion_for_audio.ipynb encounters an error when running #72

Open
ZH-UCAS opened this issue Jan 5, 2024 · 3 comments
Open

02_diffusion_for_audio.ipynb encounters an error when running #72

ZH-UCAS opened this issue Jan 5, 2024 · 3 comments

Comments

@ZH-UCAS
Copy link

ZH-UCAS commented Jan 5, 2024

/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:72: UserWarning:
The secret HF_TOKEN does not exist in your Colab secrets.
To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.
You will be able to reuse this secret in all of your notebooks.
Please note that authentication is recommended but still optional to access public models or datasets.
warnings.warn(
model_index.json: 100%
244/244 [00:00<00:00, 14.6kB/s]

ValueError Traceback (most recent call last)
in <cell line: 3>()
1 # Load a pre-trained audio diffusion pipeline
2 device = "mps" if torch.backends.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
----> 3 pipe = DiffusionPipeline.from_pretrained("teticio/audio-diffusion-instrumental-hiphop-256").to(device)

3 frames
/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py in download(cls, pretrained_model_name, **kwargs)
1698 custom_components[component] = module_candidate
1699 elif module_candidate not in LOADABLE_CLASSES and not hasattr(pipelines, module_candidate):
-> 1700 raise ValueError(
1701 f"{candidate_file} as defined in model_index.json does not exist in {pretrained_model_name} and is not a module in 'diffusers/pipelines'."
1702 )

ValueError: mel/audio_diffusion.py as defined in model_index.json does not exist in teticio/audio-diffusion-instrumental-hiphop-256 and is not a module in 'diffusers/pipelines'.

use colab
I am a beginner and cannot find the reason. Please help me.

@johnowhitaker
Copy link
Collaborator

If you try to access a model on the hub that requires you to be logged in, you need to log in. That first error is saying that it can't find your token (HF_TOKEN) in the notebook secrets.
You can find or create a token in https://huggingface.co/settings/tokens and then in the notebook you can log in with

from huggingface_hub import login
login()

and pasting in your token, or by adding it as a secret on Google Colab (which is useful since you may want to do this in many notebooks without having to copy-paste it each time)

@ZH-UCAS
Copy link
Author

ZH-UCAS commented Jan 8, 2024

The same error occurs after logging in.

@jtatman
Copy link

jtatman commented May 29, 2024

Please refer to this issue for reference: deprecated-diffusers
Looks like target diffusers version is 0.24.0 for last audio_diffusion libraries.

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