Text-to-Audio
MLX
Safetensors
English
Chinese
heartcodec
swift
music-generation
heartmula
audio-codec
Instructions to use mlx-community/HeartCodec-oss-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/HeartCodec-oss-fp16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/HeartCodec-oss-fp16 --local-dir HeartCodec-oss-fp16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 1,856 Bytes
5865bd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | {
"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": "fp16",
"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; then .to(float16)",
"tensors": 506
}
} |