Instructions to use timofeiiz/soundstream-impl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use timofeiiz/soundstream-impl with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("timofeiiz/soundstream-impl", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config_model.py from timofeiiz/soundstream-impl: direct link, hf CLI and curl.
- Browser
- Download file 496 Bytes
-
https://huggingface.co/timofeiiz/soundstream-impl/resolve/main/config_model.py
- Command line
-
hf download hf://timofeiiz/soundstream-impl/config_model.py
-
curl -L -o config_model.py https://huggingface.co/timofeiiz/soundstream-impl/resolve/main/config_model.py
496 Bytes
| from transformers import PretrainedConfig | |
| class SoundStreamConfig(PretrainedConfig): | |
| model_type = "soundstream" | |
| def __init__( | |
| self, | |
| channels: int = 32, | |
| latent_dim: int = 512, | |
| codebook_size: int = 1024, | |
| num_quantizers: int = 8, | |
| **kwargs, | |
| ): | |
| super().__init__(**kwargs) | |
| self.channels = channels | |
| self.latent_dim = latent_dim | |
| self.codebook_size = codebook_size | |
| self.num_quantizers = num_quantizers | |