PC-NSF-HiFiGAN (Burn Format)
This repository contains Burn-format weights for the upstream model:
- openvpi/vocoders β release
pc-nsf-hifigan-44.1k-hop512-128bin-2025.02
The published artifact is packaged as a Burn Pack (.bpk) archive. The repository also includes Rust tooling to regenerate the raw export manifest and Burn pack from the upstream checkpoint.
Repository Contents
Published model asset at the repository root:
pc_nsf_hifigan.bpk
Conversion and packaging sources included in the repository:
convert.sh: one-step export-and-pack script that writespc_nsf_hifigan.bpkat the repository rootsrc/bin/export_pc_nsf_hifigan_raw.rs: exports the upstream PyTorch checkpoint (model.ckpt) into.npytensors plus a manifest filesrc/bin/check_pc_nsf_hifigan_bpk.rs: loads a Burn Pack archive and prints the tensor count and total tensor bytessrc/main.rs: packs exported tensors into Burn Pack archivesCargo.toml,Cargo.lock: Rust dependencies for the packer
Included Model
PC-NSF-HiFiGAN
- Pitch-controllable NSF (neural source filter) HiFiGAN vocoder
- 44.1 kHz sampling rate, 512 hop size, 128 mel bins (mel range 40β16000 Hz)
- F0-conditioned neural source excitation with a
mini_nsfsource module (generator.source_conv) - MRF upsampling: rates
[8, 8, 2, 2, 2], kernel sizes[16, 16, 4, 4, 4], 512 initial upsampling channels - Weights are stored as weight-normalization parameter pairs (
weight_v/weight_g), exactly as in the upstream checkpoint
The current export manifest contains 293 tensors, all float32.
File Sizes
Current repository payload:
pc_nsf_hifigan.bpk: 56,613,632 bytes
Rebuilding the Artifact
The repository includes the script needed to regenerate the Burn artifact from the original upstream checkpoint.
Prerequisites
- A Rust toolchain capable of building the packer in this repository
- A local copy of the upstream checkpoint arranged like this:
CKPT_ROOT/
βββ pc_nsf_hifigan_44.1k_hop512_128bin_2025.02/
βββ model.ckpt
βββ config.json
Download the release zip from the OpenVPI vocoders release (pc_nsf_hifigan_44.1k_hop512_128bin_2025.02.zip) and unzip it into CKPT_ROOT.
The exporter reads the PyTorch zip checkpoint (model.ckpt) directly using the pure-Rust reader in burn-store (PytorchReader, pytorch feature) β no Python, PyTorch, or pickle tooling is required.
One-Step Conversion
./convert.sh CKPT_ROOT
This regenerates pc_nsf_hifigan.bpk at the repository root and removes the temporary artifact directory when finished.
Export Raw Tensors and Manifest
If you want to run the steps manually instead of using ./convert.sh:
Example:
cargo run --release --bin export_pc_nsf_hifigan_raw -- \
--checkpoint-root CKPT_ROOT \
--pcnsf-subdir pc_nsf_hifigan_44.1k_hop512_128bin_2025.02 \
--output-root artifacts/pc-nsf-hifigan
This produces:
artifacts/pc-nsf-hifigan/pc_nsf_hifigan_raw_f32/
The raw directory contains .npy tensor files and a manifest.json.
Pack Burn Archive
The Rust packer reads a manifest and writes a .bpk archive:
cargo run --release --bin pc-nsf-hifigan-burn -- \
--manifest artifacts/pc-nsf-hifigan/pc_nsf_hifigan_raw_f32/manifest.json \
--output artifacts/pc-nsf-hifigan/pc_nsf_hifigan.bpk
Verify the Archive
cargo run --release --bin check_pc_nsf_hifigan_bpk -- pc_nsf_hifigan.bpk
Notes
- This repository is a model artifact and conversion repo, not a complete inference application.
- The generated FP32 manifest references FP32 tensors.
- The repository includes the large Burn archive directly, so Git LFS configuration in
.gitattributesis part of the expected publishable layout.
License
This conversion is a derived work of the upstream openvpi/vocoders checkpoint and is distributed under the GNU Affero General Public License v3.0 (AGPLv3), matching the upstream license. The converter source in this repository (the Rust crate under src/, Cargo.toml, convert.sh) serves as the corresponding source for the converted artifact. See LICENSE for the full license text.