LeeAeron commited on
Commit
78c3900
·
verified ·
1 Parent(s): b0403e3

Upload 9 files

Browse files
.gitattributes CHANGED
@@ -1,35 +1,35 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,247 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
+ - multilingual
6
+ library_name: transformers
7
+ tags:
8
+ - text-to-speech
9
+ - audio
10
+ - tts
11
+ - voice
12
+ - quantized
13
+ - 8bit
14
+ - bitsandbytes
15
+ - vibevoice
16
+ pipeline_tag: text-to-audio
17
+ model-index:
18
+ - name: VibeVoice-Large-Q8
19
+ results: []
20
  ---
21
+
22
+ # VibeVoice-Large-Q8 - Selective 8bit Quantization
23
+
24
+ <div align="center">
25
+
26
+ **The first 8-bit VibeVoice model that actually works**
27
+
28
+ [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
29
+ [![Model Size](https://img.shields.io/badge/size-11.6%20GB-green)](https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8)
30
+ [![Quality](https://img.shields.io/badge/audio-identical%20quality-brightgreen)](https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8)
31
+
32
+ [🤗 Model](https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8) • [💻 ComfyUI](https://github.com/Enemyx-net/VibeVoice-ComfyUI) • [📖 Docs](https://github.com/Enemyx-net/VibeVoice-ComfyUI/blob/main/README.md)
33
+
34
+ </div>
35
+
36
+ ---
37
+
38
+ ## 🎯 Why This Model is Different
39
+
40
+ If you've tried other 8-bit quantized VibeVoice models, you probably got nothing but static noise. **This one actually works.**
41
+
42
+ The secret? **Selective quantization**: I only quantized the language model (the most robust part), while keeping audio-critical components (diffusion head, VAE, connectors) at full precision.
43
+
44
+ ### Results
45
+ - ✅ Perfect audio, identical to the original model
46
+ - ✅ 11.6 GB instead of 18.7 GB (-38%)
47
+ - ✅ Uses ~12 GB VRAM instead of 20 GB
48
+ - ✅ Works on 12 GB GPUs (RTX 3060, 4070 Ti, etc.)
49
+
50
+ ---
51
+
52
+ ## 🚨 The Problem with Other 8-bit Models
53
+
54
+ Most 8-bit models you'll find online quantize **everything** aggressively:
55
+ **Result:** Audio components get quantized → numerical errors propagate → audio = pure noise.
56
+
57
+ ---
58
+
59
+ ## ✅ The Solution: Selective Quantization
60
+
61
+ I only quantized what can be safely quantized without losing quality.
62
+
63
+ **Result:** 52% of parameters quantized, 48% at full precision = perfect audio quality.
64
+
65
+ ---
66
+
67
+ ## 📊 Quick Comparison
68
+
69
+ | Model | Size | Audio Quality | Status |
70
+ |-------|------|---------------|--------|
71
+ | Original VibeVoice | 18.7 GB | ⭐⭐⭐⭐⭐ | Full precision |
72
+ | Other 8-bit models | 10.6 GB | 💥 NOISE | ❌ Don't work |
73
+ | **This model** | **11.6 GB** | ⭐⭐⭐⭐⭐ | ✅ **Perfect** |
74
+
75
+ +1.0 GB vs other 8-bit models = perfect audio instead of noise. Worth it.
76
+
77
+ ---
78
+
79
+ ## 💻 How to Use It
80
+
81
+ ### With Transformers
82
+
83
+ ```python
84
+ from transformers import AutoModelForCausalLM, AutoProcessor
85
+ import torch
86
+ import scipy.io.wavfile as wavfile
87
+
88
+ # Load model
89
+ model = AutoModelForCausalLM.from_pretrained(
90
+ "FabioSarracino/VibeVoice-Large-Q8",
91
+ device_map="auto",
92
+ trust_remote_code=True,
93
+ torch_dtype=torch.bfloat16,
94
+ )
95
+
96
+ processor = AutoProcessor.from_pretrained(
97
+ "FabioSarracino/VibeVoice-Large-Q8",
98
+ trust_remote_code=True
99
+ )
100
+
101
+ # Generate audio
102
+ text = "Hello, this is VibeVoice speaking."
103
+ inputs = processor(text, return_tensors="pt").to(model.device)
104
+ output = model.generate(**inputs, max_new_tokens=None)
105
+
106
+ # Save
107
+ audio = output.speech_outputs[0].cpu().numpy()
108
+ wavfile.write("output.wav", 24000, audio)
109
+ ```
110
+
111
+ ### With ComfyUI (recommended)
112
+
113
+ 1. Install the custom node:
114
+ ```bash
115
+ cd ComfyUI/custom_nodes
116
+ git clone https://github.com/Enemyx-net/VibeVoice-ComfyUI
117
+ ```
118
+
119
+ 2. Download this model to `ComfyUI/models/vibevoice/`
120
+
121
+ 3. Restart ComfyUI and use it normally!
122
+
123
+ ---
124
+
125
+ ## 💾 System Requirements
126
+
127
+ ### Minimum
128
+ - **VRAM:** 12 GB
129
+ - **RAM:** 16 GB
130
+ - **GPU:** NVIDIA with CUDA (required)
131
+ - **Storage:** 11 GB
132
+
133
+ ### Recommended
134
+ - **VRAM:** 16+ GB
135
+ - **RAM:** 32 GB
136
+ - **GPU:** RTX 3090/4090, A5000 or better
137
+
138
+ ⚠️ **Not supported:** CPU, Apple Silicon (MPS), AMD GPUs
139
+
140
+ ---
141
+
142
+ ## ⚠️ Limitations
143
+
144
+ 1. **Requires NVIDIA GPU with CUDA** - won't work on CPU or Apple Silicon
145
+ 2. **Inference only** - don't use for fine-tuning
146
+ 3. **Requires:**
147
+ - `transformers>=4.51.3`
148
+ - `bitsandbytes>=0.43.0`
149
+
150
+ ---
151
+
152
+ ## 🆚 When to Use This Model
153
+
154
+ ### ✅ Use this 8-bit if:
155
+ - You have 12-16 GB VRAM
156
+ - You want maximum quality with reduced size
157
+ - You need a production-ready model
158
+ - You want the best size/quality balance
159
+
160
+ ### Use full precision (18.7 GB) if:
161
+ - You have unlimited VRAM (24+ GB)
162
+ - You're doing research requiring absolute precision
163
+
164
+ ### Use 4-bit NF4 (~6.6 GB) if:
165
+ - You only have 8-10 GB VRAM
166
+ - You can accept a small quality trade-off
167
+
168
+ ---
169
+
170
+ ## 🔧 Troubleshooting
171
+
172
+ ### "OutOfMemoryError" during loading
173
+
174
+ - Close other GPU applications
175
+ - Use `device_map="auto"`
176
+ - Reduce batch size to 1
177
+
178
+ ### "BitsAndBytes not found"
179
+
180
+ ```bash
181
+ pip install bitsandbytes>=0.43.0
182
+ ```
183
+
184
+ ### Audio sounds distorted
185
+
186
+ This shouldn't happen! If it does:
187
+ 1. Verify you downloaded the correct model
188
+ 2. Update transformers: `pip install --upgrade transformers`
189
+ 3. Check CUDA: `torch.cuda.is_available()` should return `True`
190
+
191
+ ---
192
+
193
+ ## 📚 Citation
194
+
195
+ ```bibtex
196
+ @misc{vibevoice-q8-2025,
197
+ title={VibeVoice-Large-Q8: Selective 8-bit Quantization for Audio Quality},
198
+ author={Fabio Sarracino},
199
+ year={2025},
200
+ url={https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8}
201
+ }
202
+ ```
203
+
204
+ ### Original Model
205
+
206
+ ```bibtex
207
+ @misc{vibevoice2024,
208
+ title={VibeVoice: High-Quality Text-to-Speech with Large Language Models},
209
+ author={Microsoft Research},
210
+ year={2024},
211
+ url={https://github.com/microsoft/VibeVoice}
212
+ }
213
+ ```
214
+
215
+ ---
216
+
217
+ ## 🔗 Related Resources
218
+
219
+ - [Original Model](https://huggingface.co/aoi-ot/VibeVoice-Large) - Full precision base
220
+ - [ComfyUI Node](https://github.com/Enemyx-net/VibeVoice-ComfyUI) - ComfyUI integration
221
+
222
+ ---
223
+
224
+ ## 📜 License
225
+
226
+ MIT License.
227
+
228
+ ---
229
+
230
+ ## 🤝 Support
231
+
232
+ - **Issues:** [GitHub Issues](https://github.com/Enemyx-net/VibeVoice-ComfyUI/issues)
233
+ - **Questions:** [HuggingFace Discussions](https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8/discussions)
234
+
235
+ If this model helped you, leave a ⭐ on GitHub!
236
+
237
+ ---
238
+
239
+ <div align="center">
240
+
241
+ **Created by [Fabio Sarracino](https://github.com/Enemyx-net)**
242
+
243
+ *The first 8-bit VibeVoice model that actually works*
244
+
245
+ [🤗 HuggingFace](https://huggingface.co/FabioSarracino/VibeVoice-Large-Q8) • [💻 GitHub](https://github.com/Enemyx-net/VibeVoice-ComfyUI)
246
+
247
+ </div>
config.json ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "acostic_vae_dim": 64,
3
+ "acoustic_tokenizer_config": {
4
+ "causal": true,
5
+ "channels": 1,
6
+ "conv_bias": true,
7
+ "conv_norm": "none",
8
+ "corpus_normalize": 0.0,
9
+ "decoder_depths": null,
10
+ "decoder_n_filters": 32,
11
+ "decoder_ratios": [
12
+ 8,
13
+ 5,
14
+ 5,
15
+ 4,
16
+ 2,
17
+ 2
18
+ ],
19
+ "disable_last_norm": true,
20
+ "encoder_depths": "3-3-3-3-3-3-8",
21
+ "encoder_n_filters": 32,
22
+ "encoder_ratios": [
23
+ 8,
24
+ 5,
25
+ 5,
26
+ 4,
27
+ 2,
28
+ 2
29
+ ],
30
+ "fix_std": 0.5,
31
+ "layer_scale_init_value": 1e-06,
32
+ "layernorm": "RMSNorm",
33
+ "layernorm_elementwise_affine": true,
34
+ "layernorm_eps": 1e-05,
35
+ "mixer_layer": "depthwise_conv",
36
+ "model_type": "vibevoice_acoustic_tokenizer",
37
+ "pad_mode": "constant",
38
+ "std_dist_type": "gaussian",
39
+ "torch_dtype": "bfloat16",
40
+ "vae_dim": 64,
41
+ "weight_init_value": 0.01
42
+ },
43
+ "acoustic_vae_dim": 64,
44
+ "architectures": [
45
+ "VibeVoiceForConditionalGenerationInference"
46
+ ],
47
+ "decoder_config": {
48
+ "attention_dropout": 0.0,
49
+ "hidden_act": "silu",
50
+ "hidden_size": 3584,
51
+ "initializer_range": 0.02,
52
+ "intermediate_size": 18944,
53
+ "max_position_embeddings": 32768,
54
+ "max_window_layers": 28,
55
+ "model_type": "qwen2",
56
+ "num_attention_heads": 28,
57
+ "num_hidden_layers": 28,
58
+ "num_key_value_heads": 4,
59
+ "rms_norm_eps": 1e-06,
60
+ "rope_scaling": null,
61
+ "rope_theta": 1000000.0,
62
+ "sliding_window": null,
63
+ "torch_dtype": "bfloat16",
64
+ "use_cache": true,
65
+ "use_mrope": false,
66
+ "use_sliding_window": false,
67
+ "vocab_size": 152064
68
+ },
69
+ "diffusion_head_config": {
70
+ "ddpm_batch_mul": 4,
71
+ "ddpm_beta_schedule": "cosine",
72
+ "ddpm_num_inference_steps": 20,
73
+ "ddpm_num_steps": 1000,
74
+ "diffusion_type": "ddpm",
75
+ "head_ffn_ratio": 3.0,
76
+ "head_layers": 4,
77
+ "hidden_size": 3584,
78
+ "latent_size": 64,
79
+ "model_type": "vibevoice_diffusion_head",
80
+ "prediction_type": "v_prediction",
81
+ "rms_norm_eps": 1e-05,
82
+ "speech_vae_dim": 64,
83
+ "torch_dtype": "bfloat16"
84
+ },
85
+ "hidden_size": 3584,
86
+ "intermediate_size": 18944,
87
+ "max_position_embeddings": 32768,
88
+ "model_type": "vibevoice",
89
+ "num_attention_heads": 28,
90
+ "num_hidden_layers": 28,
91
+ "num_key_value_heads": 4,
92
+ "quantization_config": {
93
+ "quant_method": "bitsandbytes",
94
+ "_load_in_8bit": true,
95
+ "_load_in_4bit": false,
96
+ "load_in_8bit": true,
97
+ "load_in_4bit": false,
98
+ "llm_int8_threshold": 3.0,
99
+ "llm_int8_skip_modules": [
100
+ "prediction_head",
101
+ "acoustic_connector",
102
+ "semantic_connector",
103
+ "acoustic_tokenizer",
104
+ "semantic_tokenizer"
105
+ ],
106
+ "llm_int8_enable_fp32_cpu_offload": false,
107
+ "llm_int8_has_fp16_weight": false,
108
+ "bnb_8bit_compute_dtype": "bfloat16",
109
+ "bnb_4bit_quant_type": "fp4",
110
+ "bnb_4bit_use_double_quant": false,
111
+ "bnb_4bit_compute_dtype": "bfloat16",
112
+ "bnb_4bit_quant_storage": "uint8"
113
+ },
114
+ "semantic_tokenizer_config": {
115
+ "causal": true,
116
+ "channels": 1,
117
+ "conv_bias": true,
118
+ "conv_norm": "none",
119
+ "corpus_normalize": 0.0,
120
+ "disable_last_norm": true,
121
+ "encoder_depths": "3-3-3-3-3-3-8",
122
+ "encoder_n_filters": 32,
123
+ "encoder_ratios": [
124
+ 8,
125
+ 5,
126
+ 5,
127
+ 4,
128
+ 2,
129
+ 2
130
+ ],
131
+ "fix_std": 0,
132
+ "layer_scale_init_value": 1e-06,
133
+ "layernorm": "RMSNorm",
134
+ "layernorm_elementwise_affine": true,
135
+ "layernorm_eps": 1e-05,
136
+ "mixer_layer": "depthwise_conv",
137
+ "model_type": "vibevoice_semantic_tokenizer",
138
+ "pad_mode": "constant",
139
+ "std_dist_type": "none",
140
+ "torch_dtype": "bfloat16",
141
+ "vae_dim": 128,
142
+ "weight_init_value": 0.01
143
+ },
144
+ "semantic_vae_dim": 128,
145
+ "tie_word_embeddings": false,
146
+ "torch_dtype": "bfloat16",
147
+ "transformers_version": "4.51.3",
148
+ "vocab_size": 152064,
149
+ "_quantization_method": "bitsandbytes",
150
+ "_quantization_variant": "A"
151
+ }
generation_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "transformers_version": "4.51.3"
4
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68f98075dac463766219e6e61ff5fe9ab969f8fea621a65906f1d6793f2eaf72
3
+ size 4987685394
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b79643eec675f7173a1b61040af9c4708b257005ae4175a64129d47cc8b4944
3
+ size 4958656224
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:293e0b5f0577756d67bc273142145a2a490be7909ab55f5b3dfb2f4f0993669e
3
+ size 1676460817
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processor_class": "VibeVoiceProcessor",
3
+ "speech_tok_compress_ratio": 3200,
4
+ "db_normalize": true,
5
+ "audio_processor": {
6
+ "feature_extractor_type": "VibeVoiceTokenizerProcessor",
7
+ "sampling_rate": 24000,
8
+ "normalize_audio": true,
9
+ "target_dB_FS": -25,
10
+ "eps": 1e-06
11
+ },
12
+ "language_model_pretrained_name": "Qwen/Qwen2.5-7B"
13
+ }