Text-to-Audio
MLX
Safetensors
English
Chinese
heartcodec
swift
music-generation
heartmula
audio-codec
Instructions to use mlx-community/HeartCodec-oss-fp32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/HeartCodec-oss-fp32 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/HeartCodec-oss-fp32 --local-dir HeartCodec-oss-fp32
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download config.json from mlx-community/HeartCodec-oss-fp32: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/mlx-community/HeartCodec-oss-fp32/resolve/main/config.json
- Command line
-
hf download hf://mlx-community/HeartCodec-oss-fp32/config.json
-
curl -L -o config.json https://huggingface.co/mlx-community/HeartCodec-oss-fp32/resolve/main/config.json
1.84 kB
| { | |
| "architectures": [ | |
| "HeartCodec" | |
| ], | |
| "attention_head_dim": 64, | |
| "causal": true, | |
| "codebook_dim": 32, | |
| "codebook_size": 8192, | |
| "commitment_weight": 1.0, | |
| "decay": 0.9, | |
| "default_kernel_size": 7, | |
| "delay_kernel_size": 5, | |
| "dim": 512, | |
| "downsample_factors": [ | |
| 3, | |
| 4, | |
| 4, | |
| 4, | |
| 5 | |
| ], | |
| "downsample_kernel_sizes": [ | |
| 6, | |
| 8, | |
| 8, | |
| 8, | |
| 10 | |
| ], | |
| "in_channels": 1024, | |
| "init_channel": 64, | |
| "latent_hidden_dim": 128, | |
| "model_type": "heartcodec", | |
| "norm_type": "ada_norm_single", | |
| "num_attention_heads": 24, | |
| "num_bands": 1, | |
| "num_layers": 24, | |
| "num_layers_2": 6, | |
| "num_quantizers": 8, | |
| "num_samples": 2, | |
| "out_channels": 256, | |
| "res_kernel_size": 7, | |
| "sample_rate": 48000, | |
| "threshold_ema_dead_code": 2, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.45.1", | |
| "upsample_factors": [ | |
| 5, | |
| 4, | |
| 4, | |
| 4, | |
| 3 | |
| ], | |
| "upsample_kernel_sizes": [ | |
| 10, | |
| 8, | |
| 8, | |
| 8, | |
| 6 | |
| ], | |
| "use_cosine_sim": false, | |
| "mlx_heartmula": { | |
| "component": "codec", | |
| "tier": "fp32", | |
| "source": { | |
| "repo": "HeartMuLa/HeartCodec-oss-20260123", | |
| "revision": "f889dab" | |
| }, | |
| "oracle": "HeartMuLa/heartlib@5858ca8", | |
| "renames": [ | |
| [ | |
| "^scalar_model\\.decoder\\.0\\.", | |
| "scalar_model.pre_conv." | |
| ], | |
| [ | |
| "^scalar_model\\.decoder\\.([1-5])\\.up_conv\\.layer\\.", | |
| "blocks.{N-1}\u2026" | |
| ], | |
| [ | |
| "^scalar_model\\.decoder\\.([1-5])\\.convs\\.", | |
| "blocks.{N-1}\u2026" | |
| ], | |
| [ | |
| "^scalar_model\\.decoder\\.6\\.", | |
| "scalar_model.post." | |
| ], | |
| [ | |
| "^scalar_model\\.decoder\\.7\\.", | |
| "scalar_model.out_conv." | |
| ] | |
| ], | |
| "transforms": "decode path only (SQ-Codec encoder, RVQ EMA buffers, vq_embed.project_in dropped); weight_norm folded in fp32 with torch._weight_norm(v, g, 0); Conv1d (O,I,K)->(O,K,I); ConvTranspose1d (I,O,K)->(O,K,I); RVQ codebooks (1,8192,32)->(8192,32); SQ decoder list renamed", | |
| "tensors": 506 | |
| } | |
| } |