Instructions to use JSCreatorPro/offline-music-stable-audio-open with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Stable Audio Tools
How to use JSCreatorPro/offline-music-stable-audio-open 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("JSCreatorPro/offline-music-stable-audio-open") 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 vae_model.ckpt from JSCreatorPro/offline-music-stable-audio-open: direct link, hf CLI and curl.
- Browser
- Download file 624 MB
-
https://huggingface.co/JSCreatorPro/offline-music-stable-audio-open/resolve/main/vae_model.ckpt
- Command line
-
hf download hf://JSCreatorPro/offline-music-stable-audio-open/vae_model.ckpt
-
curl -L -o vae_model.ckpt https://huggingface.co/JSCreatorPro/offline-music-stable-audio-open/resolve/main/vae_model.ckpt
624 MB
- Xet hash:
- 51d6d7ea5cad71d94f26b37dce42c1c38b869a4e2d7587ab68796c5cda3d96a1
- Size of remote file:
- 624 MB
- SHA256:
- 771265f2e9a7fa9c3b7899be2d6a5a93954032e5e696edd62239ba7f1cd67116
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.