Run this model with HF Jobs
Run cvssp/audioldm2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cvssp/audioldm2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cvssp/audioldm2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cvssp/audioldm2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use cvssp/audioldm2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("cvssp/audioldm2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update model_index.json to user GPT2LMHeadModel rather than GPT2Model
Verified signatureOn the latest transformers and diffusers libraries, this model does not work when invoked via pipeline `AudioLDM2Pipeline.from_pretrained('cvssp/audioldm2')` with the following error messages: ``` Expected types for language_model: (<class 'transformers.models.gpt2.modeling_gpt2.GPT2LMHeadModel'>,), got <class 'transformers.models.gpt2.modeling_gpt2.GPT2Model'>. ``` ``` Traceback (most recent call last): File "/home/dev/projects/megatransformer/inference/audio_generate_gr.py", line 48, in generate_audio audio = pipe( File "/home/dev/projects/megatransformer/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/home/dev/projects/megatransformer/venv/lib/python3.10/site-packages/diffusers/pipelines/audioldm2/pipeline_audioldm2.py", line 995, in __call__ prompt_embeds, attention_mask, generated_prompt_embeds = self.encode_prompt( File "/home/dev/projects/megatransformer/venv/lib/python3.10/site-…0f0549c
-
Update README.md
Verified signaturec8e7e18
-
Update README.md
6b532af
-
Create README.md
dc472e9 -
Add model weights and config
Sanchit Gandhiefd334c -
initial commit
Sanchit Gandhie238d94