Spaces:
Running on Zero
Running on Zero
Download songgen/xcodec_wrapper/configuration_xcodec.py from teamup-tech/SongGen: direct link, hf CLI and curl.
- Browser
- Download file 658 Bytes
-
https://huggingface.co/spaces/teamup-tech/SongGen/resolve/main/songgen/xcodec_wrapper/configuration_xcodec.py
- Command line
-
hf download hf://spaces/teamup-tech/SongGen/songgen/xcodec_wrapper/configuration_xcodec.py
-
curl -L -o configuration_xcodec.py https://huggingface.co/spaces/teamup-tech/SongGen/resolve/main/songgen/xcodec_wrapper/configuration_xcodec.py
658 Bytes
| from transformers import PretrainedConfig | |
| class XCodecConfig(PretrainedConfig): | |
| model_type = "xcodec" | |
| def __init__( | |
| self, | |
| num_codebooks: int = 8, | |
| model_bitrate: int = 4, # kbps | |
| codebook_size: int = 1024, | |
| # latent_dim: int = 1024, | |
| frame_rate: int = 50, | |
| sampling_rate: int = 16000, | |
| **kwargs, | |
| ): | |
| self.codebook_size = codebook_size | |
| self.model_bitrate = model_bitrate | |
| # self.latent_dim = latent_dim | |
| self.num_codebooks = num_codebooks | |
| self.frame_rate = frame_rate | |
| self.sampling_rate = sampling_rate | |
| super().__init__(**kwargs) | |