Instructions to use cudabenchmarktest/stable-audio-open-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Stable Audio Tools
How to use cudabenchmarktest/stable-audio-open-1.0 with Stable Audio Tools:
import torch import torchaudio from einops import rearrange from stable_audio_tools import get_pretrained_model from stable_audio_tools.inference.generation import generate_diffusion_cond device = "cuda" if torch.cuda.is_available() else "cpu" # Download model model, model_config = get_pretrained_model("cudabenchmarktest/stable-audio-open-1.0") sample_rate = model_config["sample_rate"] sample_size = model_config["sample_size"] model = model.to(device) # Set up text and timing conditioning conditioning = [{ "prompt": "128 BPM tech house drum loop", }] # Generate stereo audio output = generate_diffusion_cond( model, conditioning=conditioning, sample_size=sample_size, device=device ) # Rearrange audio batch to a single sequence output = rearrange(output, "b d n -> d (b n)") # Peak normalize, clip, convert to int16, and save to file output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu() torchaudio.save("output.wav", output, sample_rate) - Notebooks
- Google Colab
- Kaggle
Download freesound_dataset_attribution2.csv from cudabenchmarktest/stable-audio-open-1.0: direct link, hf CLI and curl.
- Browser
- Download file 50.4 MB
-
https://huggingface.co/cudabenchmarktest/stable-audio-open-1.0/resolve/main/freesound_dataset_attribution2.csv
- Command line
-
hf download hf://cudabenchmarktest/stable-audio-open-1.0/freesound_dataset_attribution2.csv
-
curl -L -o freesound_dataset_attribution2.csv https://huggingface.co/cudabenchmarktest/stable-audio-open-1.0/resolve/main/freesound_dataset_attribution2.csv
50.4 MB
- Xet hash:
- 42202d324bff653b15c13cc711c8297513d9fc21f37dc36b1ca3bad2f6567439
- Size of remote file:
- 50.4 MB
- SHA256:
- 8819b131646d3e48aa9e4571f7484c7a269bb9b639f2ce78a86e2cdefa5bb8eb
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.