tamarher commited on
Commit
b10879c
·
verified ·
1 Parent(s): e8e56bb

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlx
3
+ pipeline_tag: text-to-speech
4
+ base_model: stepfun-ai/Step-Audio-EditX
5
+ base_model_relation: quantized
6
+ license: apache-2.0
7
+ language:
8
+ - en
9
+ - zh
10
+ - ja
11
+ - ko
12
+ tags:
13
+ - mlx
14
+ - tts
15
+ - speech
16
+ - voice-cloning
17
+ - audio-editing
18
+ - step-audio
19
+ - step-audio-editx
20
+ - stepfun
21
+ - quantized
22
+ - int8
23
+ - apple-silicon
24
+ - bundled-components
25
+ ---
26
+
27
+ # Step-Audio-EditX — MLX 8-bit
28
+
29
+ This repository contains a self-contained pure-MLX int8 conversion of
30
+ Step-Audio-EditX for local voice cloning and expressive audio editing on
31
+ Apple Silicon. All pipeline components are stored as `.safetensors` — no
32
+ PyTorch, ONNX, or NumPy files are required at inference time.
33
+
34
+ ## Model Details
35
+
36
+ - Developed by: AppAutomaton
37
+ - Upstream model: [`stepfun-ai/Step-Audio-EditX`](https://huggingface.co/stepfun-ai/Step-Audio-EditX)
38
+ - Task: zero-shot voice cloning, expressive audio editing
39
+ - Runtime: MLX on Apple Silicon
40
+ - Precision: int8 for Step1 LM, Flow model, and VQ02 tokenizer; bf16 for the rest
41
+ - Total size: ~4.1 GB (down from ~7.7 GB upstream)
42
+
43
+ ## Bundle Contents
44
+
45
+ This bundle is self-contained — all weights are packaged in one repository.
46
+
47
+ | File | Component | Format | Size |
48
+ | --- | --- | --- | --- |
49
+ | `model.safetensors` | Step1 LM (3.5B params) | int8 | 3.5 GB |
50
+ | `flow-model.safetensors` | Flow model (DiT + conformer) | int8 | 181 MB |
51
+ | `vq02.safetensors` | VQ02 audio tokenizer | int8 | 162 MB |
52
+ | `vq06.safetensors` | VQ06 audio tokenizer | bf16 | 249 MB |
53
+ | `hift.safetensors` | HiFT vocoder | bf16 | 40 MB |
54
+ | `campplus.safetensors` | CampPlus speaker embedding | bf16 | 13 MB |
55
+ | `flow-conditioner.safetensors` | Flow conditioner | bf16 | 2.5 MB |
56
+ | `config.json` | Step1 LM config + quantization | JSON | — |
57
+ | `flow-model-config.json` | Flow model config | JSON | — |
58
+ | `vq02-config.json`, `vq06-config.json` | Tokenizer configs | JSON | — |
59
+ | `hift-config.json`, `campplus-config.json`, `flow-conditioner-config.json` | Component configs | JSON | — |
60
+ | `tokenizer.json`, `tokenizer.model`, `tokenizer_config.json` | Step1 tokenizer | JSON | — |
61
+
62
+ ## How to Get Started
63
+
64
+ Install [`mlx-speech`](https://github.com/appautomaton/mlx-speech) and clone
65
+ the repo (the Step Audio CLI entry point is not yet in the unified public API).
66
+
67
+ ```bash
68
+ pip install mlx-speech
69
+ git clone https://github.com/appautomaton/mlx-speech.git
70
+ cd mlx-speech
71
+ ```
72
+
73
+ Download the bundle with `huggingface-cli`:
74
+
75
+ ```bash
76
+ hf download appautomaton/step-audio-editx-8bit-mlx \
77
+ --local-dir models/stepfun/step_audio_editx/mlx-int8
78
+ ```
79
+
80
+ **Voice cloning:**
81
+
82
+ ```bash
83
+ python scripts/generate_step_audio_editx.py \
84
+ --model-dir models/stepfun/step_audio_editx/mlx-int8 \
85
+ --prefer-mlx-int8 \
86
+ --prompt-audio reference.wav \
87
+ --prompt-text "Transcript of reference audio." \
88
+ -o cloned.wav \
89
+ clone --target-text "New speech in the cloned voice."
90
+ ```
91
+
92
+ **Audio editing (change emotion):**
93
+
94
+ ```bash
95
+ python scripts/generate_step_audio_editx.py \
96
+ --model-dir models/stepfun/step_audio_editx/mlx-int8 \
97
+ --prefer-mlx-int8 \
98
+ --prompt-audio input.wav \
99
+ --prompt-text "Transcript of input audio." \
100
+ -o happy.wav \
101
+ edit --edit-type emotion --edit-info happy
102
+ ```
103
+
104
+ ## Supported Edit Types
105
+
106
+ | Edit type | Description | `--edit-info` examples |
107
+ | --- | --- | --- |
108
+ | `emotion` | Change the emotion of speech | `happy`, `sad`, `angry`, `surprised` |
109
+ | `style` | Change speaking style | `whispering`, `broadcasting`, `formal` |
110
+ | `speed` | Change speaking speed | `fast`, `slow` |
111
+ | `denoise` | Remove noise from audio | not used |
112
+ | `vad` | Remove silences from audio | not used |
113
+ | `paralinguistic` | Add non-verbal sounds | requires `--target-text` |
114
+
115
+ ## Architecture
116
+
117
+ Five-stage pipeline, all running pure MLX with bf16 activations:
118
+
119
+ 1. **Step1 LM** (3.5B params, int8) — autoregressive dual-codebook token generation
120
+ 2. **CampPlus** (bf16) — speaker embedding extraction from reference audio
121
+ 3. **Flow conditioner** (bf16) — conditions generation on speaker embedding
122
+ 4. **Flow model** (int8) — flow-matching mel spectrogram generation
123
+ 5. **HiFT vocoder** (bf16) — mel spectrogram to waveform
124
+
125
+ The VQ02 and VQ06 tokenizers encode reference audio into dual codebook tokens
126
+ consumed by Step1.
127
+
128
+ ## Performance
129
+
130
+ On Apple Silicon with int8 weights and bf16 activations, real-time factor
131
+ (RTF) is approximately 1.46x for voice cloning — faster than real-time.
132
+
133
+ ## Links
134
+
135
+ - Source code: [`mlx-speech`](https://github.com/appautomaton/mlx-speech)
136
+ - Upstream model: [`stepfun-ai/Step-Audio-EditX`](https://huggingface.co/stepfun-ai/Step-Audio-EditX)
137
+ - Technical report: [arXiv:2511.03601](https://arxiv.org/abs/2511.03601)
138
+ - More examples: [AppAutomaton](https://github.com/appautomaton)
campplus-config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feat_dim": 80,
3
+ "embedding_size": 192,
4
+ "growth_rate": 32,
5
+ "init_channels": 128,
6
+ "block_layers": [
7
+ 12,
8
+ 24,
9
+ 16
10
+ ],
11
+ "segment_pool_size": 100,
12
+ "sample_rate": 16000,
13
+ "num_mel_bins": 80,
14
+ "output_level": "segment"
15
+ }
campplus.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40d2618b188444a982932ff9bfa7f79a1089d38ee58a3a84f592156ad35a0421
3
+ size 13881588
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "hidden_size": 3072,
3
+ "intermediate_size": 8192,
4
+ "num_attention_heads": 48,
5
+ "num_attention_groups": 4,
6
+ "num_hidden_layers": 32,
7
+ "vocab_size": 74752,
8
+ "rms_norm_eps": 1e-05,
9
+ "bos_token_id": 1,
10
+ "pad_token_id": 0,
11
+ "eos_token_id": 3,
12
+ "tie_word_embeddings": false,
13
+ "use_cache": true,
14
+ "max_seq_len": 32768,
15
+ "model_type": "step1",
16
+ "architectures": [
17
+ "Step1ForCausalLM"
18
+ ],
19
+ "torch_dtype": "bfloat16",
20
+ "auto_map": {
21
+ "AutoConfig": "configuration_step1.Step1Config",
22
+ "AutoModelForCausalLM": "modeling_step1.Step1ForCausalLM"
23
+ },
24
+ "quantization": {
25
+ "bits": 8,
26
+ "group_size": 64,
27
+ "mode": "affine"
28
+ }
29
+ }
flow-conditioner-config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vocab_size": 5121,
3
+ "input_size": 512,
4
+ "output_size": 80,
5
+ "spk_embed_dim": 192,
6
+ "vq02_pad_token": 1024,
7
+ "vq06_prompt_offset": 1024,
8
+ "vq06_vocoder_base": 1025,
9
+ "prompt_mel_upsample": 2
10
+ }
flow-conditioner.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:108792964617513bf2b0d8a47255bc8efa7e63acef1b96b866b3d97c0ea8f6a7
3
+ size 2653151
flow-model-config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input_size": 512,
3
+ "output_size": 80,
4
+ "spk_embed_dim": 192,
5
+ "vocab_size": 5121,
6
+ "encoder_output_size": 512,
7
+ "pre_lookahead_len": 3,
8
+ "num_blocks": 6,
9
+ "num_up_blocks": 4,
10
+ "up_stride": 2,
11
+ "up_scale_factor": 2.0,
12
+ "attention_heads": 8,
13
+ "linear_units": 2048,
14
+ "key_bias": true,
15
+ "estimator_in_channels": 320,
16
+ "estimator_out_channels": 80,
17
+ "estimator_hidden_size": 512,
18
+ "estimator_depth": 16,
19
+ "estimator_num_heads": 8,
20
+ "estimator_head_dim": 64,
21
+ "estimator_mlp_ratio": 4.0,
22
+ "inference_cfg_rate": 0.7,
23
+ "quantization": {
24
+ "bits": 8,
25
+ "group_size": 64,
26
+ "mode": "affine"
27
+ }
28
+ }
flow-model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40fb429efee588d5c9d124eab6e69517aa80549b04f2710d4495c8f49c046d1a
3
+ size 190272187
hift-config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "in_channels": 80,
3
+ "base_channels": 512,
4
+ "nb_harmonics": 8,
5
+ "sampling_rate": 24000,
6
+ "nsf_alpha": 0.1,
7
+ "nsf_sigma": 0.003,
8
+ "nsf_voiced_threshold": 10.0,
9
+ "upsample_rates": [
10
+ 8,
11
+ 5,
12
+ 3
13
+ ],
14
+ "upsample_kernel_sizes": [
15
+ 16,
16
+ 11,
17
+ 7
18
+ ],
19
+ "istft_n_fft": 16,
20
+ "istft_hop_len": 4,
21
+ "resblock_kernel_sizes": [
22
+ 3,
23
+ 7,
24
+ 11
25
+ ],
26
+ "resblock_dilation_sizes": [
27
+ [
28
+ 1,
29
+ 3,
30
+ 5
31
+ ],
32
+ [
33
+ 1,
34
+ 3,
35
+ 5
36
+ ],
37
+ [
38
+ 1,
39
+ 3,
40
+ 5
41
+ ]
42
+ ],
43
+ "source_resblock_kernel_sizes": [
44
+ 7,
45
+ 7,
46
+ 11
47
+ ],
48
+ "source_resblock_dilation_sizes": [
49
+ [
50
+ 1,
51
+ 3,
52
+ 5
53
+ ],
54
+ [
55
+ 1,
56
+ 3,
57
+ 5
58
+ ],
59
+ [
60
+ 1,
61
+ 3,
62
+ 5
63
+ ]
64
+ ],
65
+ "lrelu_slope": 0.1,
66
+ "audio_limit": 0.99,
67
+ "f0_predictor": {
68
+ "num_class": 1,
69
+ "in_channels": 80,
70
+ "cond_channels": 512
71
+ }
72
+ }
hift.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28a40adb4e2a8bc401b9a12cca2e9219e486e0601ad57b32584a9f3e7e1e41fd
3
+ size 41637433
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b7fb89f4e58b8a91aa63c237cb5331777c9b7342c34c2e2b1e88952b908e8e1
3
+ size 3750584760
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25e122d9205d035033a9994c4d46a6a1b467a938654e4178fc0e5f4f5d610674
3
+ size 1264044
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "clean_up_tokenization_spaces": false,
4
+ "eos_token": "</s>",
5
+ "legacy": false,
6
+ "model_max_length": 65536,
7
+ "pad_token": "<unk>",
8
+ "padding_side": "left",
9
+ "sp_model_kwargs": {},
10
+ "tokenizer_class": "LlamaTokenizer",
11
+ "unk_token": "<unk>",
12
+ "use_default_system_prompt": false,
13
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{{ '<s>' }}{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}{% set role = 'human' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<|BOT|> ' + role + '\\n' }}{{ message['content'] }}{% if not loop.last or message['role'] != 'assistant' %}{{ '<|EOT|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|BOT|> assistant\\n' }}{% endif %}"
14
+ }
15
+
vq02-config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "ParaformerStreaming",
3
+ "frontend": {
4
+ "sample_rate": 16000,
5
+ "window_type": "hamming",
6
+ "n_mels": 80,
7
+ "frame_length_ms": 25.0,
8
+ "frame_shift_ms": 10.0,
9
+ "lfr_m": 7,
10
+ "lfr_n": 6,
11
+ "dither": 1.0,
12
+ "snip_edges": true,
13
+ "remove_dc_offset": true,
14
+ "preemphasis_coefficient": 0.97,
15
+ "round_to_power_of_two": true,
16
+ "low_freq": 20.0,
17
+ "high_freq": 0.0,
18
+ "use_power": true,
19
+ "use_log_fbank": true,
20
+ "use_energy": false
21
+ },
22
+ "encoder": {
23
+ "input_size": 560,
24
+ "output_size": 512,
25
+ "attention_heads": 4,
26
+ "linear_units": 2048,
27
+ "num_blocks": 50,
28
+ "normalize_before": true,
29
+ "kernel_size": 11,
30
+ "sanm_shift": 0,
31
+ "input_layer": "pe_online",
32
+ "selfattention_layer_type": "sanm"
33
+ },
34
+ "quantization": {
35
+ "bits": 8,
36
+ "group_size": 64,
37
+ "mode": "affine"
38
+ }
39
+ }
vq02.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4caa0d4ef375727e07da750af2ee4c1d9becaf7b9f0018d358db700681593798
3
+ size 169352242
vq06-config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "num_mels": 128,
3
+ "hidden_size": 1280,
4
+ "num_heads": 20,
5
+ "num_layers": 6,
6
+ "max_positions": 1500,
7
+ "codebook_size": 4096,
8
+ "conv1_kernel_size": 3,
9
+ "conv1_stride": 2,
10
+ "conv1_padding": 1,
11
+ "conv2_kernel_size": 3,
12
+ "conv2_stride": 2,
13
+ "conv2_padding": 1,
14
+ "layer_norm_eps": 1e-05,
15
+ "l2_norm_eps": 9.999999960041972e-13
16
+ }
vq06.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b10c2501908c26ccf14c93995d3110801c5a86221eb919e3481d812a4cb9c86
3
+ size 261268214