prince-canuma commited on
Commit
40588b8
·
verified ·
1 Parent(s): 59304c9

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +46 -0
  2. config.json +116 -0
  3. model.safetensors +3 -0
  4. model.safetensors.index.json +0 -0
README.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - zh
5
+ - en
6
+ library_name: mlx-audio
7
+ tags:
8
+ - mlx
9
+ - text-to-speech
10
+ - speech
11
+ - speech generation
12
+ - voice cloning
13
+ - tts
14
+ - mlx-audio
15
+ ---
16
+ # mlx-community/LongCat-AudioDiT-1B-4bit
17
+
18
+ This model was converted to MLX format from [`meituan-longcat/LongCat-AudioDiT-1B`](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-1B) using mlx-audio version **0.4.3**.
19
+
20
+ Refer to the [original model card](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-1B) for more details on the model.
21
+
22
+ ## Use with mlx-audio
23
+
24
+ ```bash
25
+ pip install -U mlx-audio
26
+ ```
27
+
28
+ ### CLI Example:
29
+ ```bash
30
+ python -m mlx_audio.tts.generate --model mlx-community/LongCat-AudioDiT-1B-4bit --text "Hello, this is a test."
31
+ ```
32
+
33
+ ### Python Example:
34
+ ```python
35
+ from mlx_audio.tts.utils import load_model
36
+ from mlx_audio.tts.generate import generate_audio
37
+
38
+ model = load_model("mlx-community/LongCat-AudioDiT-1B-4bit")
39
+ generate_audio(
40
+ model=model,
41
+ text="Hello, this is a test.",
42
+ ref_audio="path_to_audio.wav",
43
+ file_prefix="test_audio",
44
+ )
45
+
46
+ ```
config.json ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dit_adaln_type": "global",
3
+ "dit_adaln_use_text_cond": true,
4
+ "dit_bias": true,
5
+ "dit_cross_attn": true,
6
+ "dit_cross_attn_norm": false,
7
+ "dit_depth": 24,
8
+ "dit_dim": 1536,
9
+ "dit_dropout": 0.0,
10
+ "dit_eps": 1e-06,
11
+ "dit_ff_mult": 4,
12
+ "dit_heads": 24,
13
+ "dit_long_skip": true,
14
+ "dit_qk_norm": true,
15
+ "dit_text_conv": true,
16
+ "dit_text_dim": 768,
17
+ "dit_use_latent_condition": true,
18
+ "latent_dim": 64,
19
+ "latent_hop": 2048,
20
+ "max_wav_duration": 30,
21
+ "model_type": "longcat_audiodit",
22
+ "quantization": {
23
+ "group_size": 64,
24
+ "bits": 4,
25
+ "mode": "affine"
26
+ },
27
+ "quantization_config": {
28
+ "group_size": 64,
29
+ "bits": 4,
30
+ "mode": "affine"
31
+ },
32
+ "repa_dit_layer": 8,
33
+ "sampling_rate": 24000,
34
+ "sigma": 0.0,
35
+ "text_add_embed": true,
36
+ "text_encoder_config": {
37
+ "_name_or_path": "ArthurZ/umt5-base",
38
+ "architectures": [
39
+ "UMT5ForConditionalGeneration"
40
+ ],
41
+ "chunk_size_feed_forward": 0,
42
+ "classifier_dropout": 0.0,
43
+ "d_ff": 2048,
44
+ "d_kv": 64,
45
+ "d_model": 768,
46
+ "decoder_start_token_id": 0,
47
+ "dense_act_fn": "gelu_new",
48
+ "dropout_rate": 0.1,
49
+ "dtype": "float32",
50
+ "eos_token_id": 1,
51
+ "feed_forward_proj": "gated-gelu",
52
+ "id2label": {
53
+ "0": "LABEL_0",
54
+ "1": "LABEL_1"
55
+ },
56
+ "initializer_factor": 1.0,
57
+ "is_decoder": false,
58
+ "is_encoder_decoder": true,
59
+ "is_gated_act": true,
60
+ "label2id": {
61
+ "LABEL_0": 0,
62
+ "LABEL_1": 1
63
+ },
64
+ "layer_norm_epsilon": 1e-06,
65
+ "model_type": "umt5",
66
+ "num_decoder_layers": 12,
67
+ "num_heads": 12,
68
+ "num_layers": 12,
69
+ "output_attentions": false,
70
+ "output_hidden_states": false,
71
+ "output_past": true,
72
+ "pad_token_id": 0,
73
+ "problem_type": null,
74
+ "relative_attention_max_distance": 128,
75
+ "relative_attention_num_buckets": 32,
76
+ "return_dict": true,
77
+ "scalable_attention": true,
78
+ "tie_word_embeddings": true,
79
+ "tokenizer_class": "T5Tokenizer",
80
+ "use_cache": true,
81
+ "vocab_size": 256384
82
+ },
83
+ "text_encoder_model": "google/umt5-base",
84
+ "text_norm_feat": true,
85
+ "transformers_version": "5.3.0",
86
+ "vae_config": {
87
+ "c_mults": [
88
+ 1,
89
+ 2,
90
+ 4,
91
+ 8,
92
+ 16
93
+ ],
94
+ "channels": 128,
95
+ "downsample_shortcut": "averaging",
96
+ "downsampling_ratio": 2048,
97
+ "encoder_latent_dim": 128,
98
+ "final_tanh": false,
99
+ "in_channels": 1,
100
+ "in_shortcut": "duplicating",
101
+ "latent_dim": 64,
102
+ "model_type": "audiodit_vae",
103
+ "out_shortcut": "averaging",
104
+ "sample_rate": 24000,
105
+ "scale": 0.71,
106
+ "strides": [
107
+ 2,
108
+ 4,
109
+ 4,
110
+ 8,
111
+ 8
112
+ ],
113
+ "upsample_shortcut": "duplicating",
114
+ "use_snake": true
115
+ }
116
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f492cab2990823b7dbdd927e8faf87369bc993bbf145a48265fba9218b5eccf
3
+ size 1417765849
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff