Instructions to use ncoder-ai/VibeVoice-Large-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ncoder-ai/VibeVoice-Large-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="ncoder-ai/VibeVoice-Large-AWQ")# Load model directly from transformers import VibeVoiceForConditionalGenerationInference model = VibeVoiceForConditionalGenerationInference.from_pretrained("ncoder-ai/VibeVoice-Large-AWQ", dtype="auto") - VibeVoice
How to use ncoder-ai/VibeVoice-Large-AWQ with VibeVoice:
import torch, soundfile as sf, librosa, numpy as np from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference # Load voice sample (should be 24kHz mono) voice, sr = sf.read("path/to/voice_sample.wav") if voice.ndim > 1: voice = voice.mean(axis=1) if sr != 24000: voice = librosa.resample(voice, sr, 24000) processor = VibeVoiceProcessor.from_pretrained("ncoder-ai/VibeVoice-Large-AWQ") model = VibeVoiceForConditionalGenerationInference.from_pretrained( "ncoder-ai/VibeVoice-Large-AWQ", torch_dtype=torch.bfloat16 ).to("cuda").eval() model.set_ddpm_inference_steps(5) inputs = processor(text=["Speaker 0: Hello!\nSpeaker 1: Hi there!"], voice_samples=[[voice]], return_tensors="pt") audio = model.generate(**inputs, cfg_scale=1.3, tokenizer=processor.tokenizer).speech_outputs[0] sf.write("output.wav", audio.cpu().numpy().squeeze(), 24000) - Notebooks
- Google Colab
- Kaggle
| { | |
| "acostic_vae_dim": 64, | |
| "acoustic_tokenizer_config": { | |
| "causal": true, | |
| "channels": 1, | |
| "conv_bias": true, | |
| "conv_norm": "none", | |
| "corpus_normalize": 0.0, | |
| "decoder_depths": null, | |
| "decoder_n_filters": 32, | |
| "decoder_ratios": [ | |
| 8, | |
| 5, | |
| 5, | |
| 4, | |
| 2, | |
| 2 | |
| ], | |
| "disable_last_norm": true, | |
| "encoder_depths": "3-3-3-3-3-3-8", | |
| "encoder_n_filters": 32, | |
| "encoder_ratios": [ | |
| 8, | |
| 5, | |
| 5, | |
| 4, | |
| 2, | |
| 2 | |
| ], | |
| "fix_std": 0.5, | |
| "layer_scale_init_value": 1e-06, | |
| "layernorm": "RMSNorm", | |
| "layernorm_elementwise_affine": true, | |
| "layernorm_eps": 1e-05, | |
| "mixer_layer": "depthwise_conv", | |
| "model_type": "vibevoice_acoustic_tokenizer", | |
| "pad_mode": "constant", | |
| "std_dist_type": "gaussian", | |
| "torch_dtype": "float16", | |
| "vae_dim": 64, | |
| "weight_init_value": 0.01 | |
| }, | |
| "acoustic_vae_dim": 64, | |
| "architectures": [ | |
| "VibeVoiceForConditionalGenerationInference" | |
| ], | |
| "decoder_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "silu", | |
| "hidden_size": 3584, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 18944, | |
| "max_position_embeddings": 32768, | |
| "max_window_layers": 28, | |
| "model_type": "qwen2", | |
| "num_attention_heads": 28, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 4, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000.0, | |
| "sliding_window": null, | |
| "torch_dtype": "float16", | |
| "use_cache": true, | |
| "use_mrope": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 152064 | |
| }, | |
| "diffusion_head_config": { | |
| "ddpm_batch_mul": 4, | |
| "ddpm_beta_schedule": "cosine", | |
| "ddpm_num_inference_steps": 20, | |
| "ddpm_num_steps": 1000, | |
| "diffusion_type": "ddpm", | |
| "head_ffn_ratio": 3.0, | |
| "head_layers": 4, | |
| "hidden_size": 3584, | |
| "latent_size": 64, | |
| "model_type": "vibevoice_diffusion_head", | |
| "prediction_type": "v_prediction", | |
| "rms_norm_eps": 1e-05, | |
| "speech_vae_dim": 64, | |
| "torch_dtype": "float16" | |
| }, | |
| "model_type": "vibevoice", | |
| "quantization_config": { | |
| "bits": 4, | |
| "group_size": 128, | |
| "modules_to_not_convert": [ | |
| "acoustic_tokenizer", | |
| "semantic_tokenizer", | |
| "acoustic_connector", | |
| "semantic_connector", | |
| "prediction_head", | |
| "lm_head" | |
| ], | |
| "quant_method": "awq", | |
| "version": "gemm", | |
| "zero_point": true | |
| }, | |
| "semantic_tokenizer_config": { | |
| "causal": true, | |
| "channels": 1, | |
| "conv_bias": true, | |
| "conv_norm": "none", | |
| "corpus_normalize": 0.0, | |
| "disable_last_norm": true, | |
| "encoder_depths": "3-3-3-3-3-3-8", | |
| "encoder_n_filters": 32, | |
| "encoder_ratios": [ | |
| 8, | |
| 5, | |
| 5, | |
| 4, | |
| 2, | |
| 2 | |
| ], | |
| "fix_std": 0, | |
| "layer_scale_init_value": 1e-06, | |
| "layernorm": "RMSNorm", | |
| "layernorm_elementwise_affine": true, | |
| "layernorm_eps": 1e-05, | |
| "mixer_layer": "depthwise_conv", | |
| "model_type": "vibevoice_semantic_tokenizer", | |
| "pad_mode": "constant", | |
| "std_dist_type": "none", | |
| "torch_dtype": "float16", | |
| "vae_dim": 128, | |
| "weight_init_value": 0.01 | |
| }, | |
| "semantic_vae_dim": 128, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.51.3" | |
| } | |