{"id":28947305,"url":"https://github.com/yrom/mlx-bigvgan","last_synced_at":"2026-03-17T23:07:43.947Z","repository":{"id":292280168,"uuid":"974199144","full_name":"yrom/mlx-bigvgan","owner":"yrom","description":"MLX implementation of https://github.com/NVIDIA/BigVGAN","archived":false,"fork":false,"pushed_at":"2025-05-14T04:16:38.000Z","size":3693,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T16:31:01.751Z","etag":null,"topics":["gan","mlx","python3","vocoder"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-28T12:06:40.000Z","updated_at":"2025-05-15T23:51:48.000Z","dependencies_parsed_at":"2025-05-09T04:33:22.246Z","dependency_job_id":"4d5ab101-1743-4b53-b3dd-6f49a96744d6","html_url":"https://github.com/yrom/mlx-bigvgan","commit_stats":null,"previous_names":["yrom/mlx-bigvgan"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yrom/mlx-bigvgan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yrom%2Fmlx-bigvgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yrom%2Fmlx-bigvgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yrom%2Fmlx-bigvgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yrom%2Fmlx-bigvgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yrom","download_url":"https://codeload.github.com/yrom/mlx-bigvgan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yrom%2Fmlx-bigvgan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gan","mlx","python3","vocoder"],"created_at":"2025-06-23T09:10:00.199Z","updated_at":"2026-03-17T23:07:43.937Z","avatar_url":"https://github.com/yrom.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MLX BigVGAN\n\nAn MLX-adapted implementation of [BigVGAN](https://github.com/NVIDIA/BigVGAN).\n\n## Features\n\n- **BigVGAN Integration**: Fully integrates the original BigVGAN model with MLX for enhanced compatibility and performance.\n- **Flexible Conversion**: Includes tools to convert the original BigVGAN PyTorch weights to MLX format.\n- **Customizable Configurations**: Supports various configurations for kernel sizes, dilation rates, and activation functions (e.g., `snake`, `snakebeta`).\n- **Pretrained Models**: Easily load pretrained BigVGAN models from the Hugging Face Hub.\n\n## Installation\n\n```bash\npip install mlx-bigvgan\n```\n\n## Usage\n\n\n### 1. Load Pretrained Model\n```python\nfrom mlx_bigvgan import BigVGAN\n\nmodel = BigVGAN.from_pretrained(\"wyrom/mlx-bigvgan_v2_24khz_100band_256x\")\nmodel.eval()\nmx.eval(model.parameters())\n```\n\n\n### 2. Generate Audio\n```python\nimport numpy as np\nimport mlx.core as mx\nfrom mlx_bigvgan import log_mel_spectrogram, load_audio\n# Load audio file\naudio = load_audio(\"path/to/audio.wav\")\nh = model.config\n# Compute log-mel spectrogram\nmel_spec = log_mel_spectrogram(audio,\n    n_fft=h.n_fft,\n    n_mels=h.num_mels,\n    sample_rate=h.sampling_rate,\n    hop_length=h.hop_size,\n    fmin=h.fmin,\n    fmax=h.fmax,\n    padding=(h.n_fft - h.hop_size) // 2,\n    mel_norm=\"slaney\",\n    mel_scale=\"slaney\",\n    power=1.0,\n)\n# reshape to [B(1), T, C_mels]\nmel_spec = mx.expand_dims(mel_spec, 0)\n# Generate waveform\nwaveform = model(mel_spec) # [B(1), T, 1]\n# Reshape to [T, 1]\nwaveform_float = waveform.squeeze(0)\n\n# Convert to int16\nwaveform_int16 = mx.clip(waveform_float * 32767, -32768, 32767).astype(mx.int16)\n\n# save to wav\nimport soundfile as sf\n\nsf.write(\"output.wav\", waveform_int16, h.sampling_rate, \"PCM_16\")\n```\n\n### 3. Convert Original BigVGAN Weights to MLX Format\n\nYou can convert the original BigVGAN weights to MLX format using the provided script. \n\n`repo_id` is the Hugging Face model ID of the original BigVGAN model you want to convert. \n\nSee [nvidia/BigVGAN](https://huggingface.co/collections/nvidia/bigvgan-66959df3d97fd7d98d97dc9a) for move pretrained models.\n\n```bash\npython -m mlx_bigvgan.convert --repo_id nvidia/bigvgan_v2_xxx  --output_dir mlx_models\n```\n\n## References\n\n- [BigVGAN](https://github.com/NVIDIA/BigVGAN)\n- [MLX](https://github.com/ml-explore/mlx)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyrom%2Fmlx-bigvgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyrom%2Fmlx-bigvgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyrom%2Fmlx-bigvgan/lists"}