FCPE (Burn Format)
This repository contains Burn-format weights for the upstream model:
- CNChTu/FCPE (Fast Context-based Pitch Estimation, torchfcpe)
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:
fcpe.bpk
Conversion and packaging sources included in the repository:
convert.sh: one-step export-and-pack script that writesfcpe.bpkat the repository rootsrc/bin/export_fcpe_raw.rs: exports the upstream ONNX checkpoint (fcpe.onnx) into.npytensors plus a manifest filesrc/bin/check_fcpe_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
FCPE (Fast Context-based Pitch Estimation)
- Neural F0/pitch detection for singing voice
- Conformer/ConvNeXt-style encoder operating on mel spectrograms
- Outputs per-frame pitch probability distributions, decoded with
local_argmax
The current FCPE export manifest contains 76 tensors (65 float32, 11 int64), all exported in FP32.
File Sizes
Current repository payload:
fcpe.bpk: 43,317,528 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/
βββ FCPE/
βββ fcpe.onnx
The upstream torchfcpe package bundles the same weights as torchfcpe/assets/fcpe_c_v001.pt (a PyTorch pickle, not parseable with pure Rust). An ONNX export of the identical graph (fcpe.onnx) is vendored in the niobures/FCPE Hugging Face mirror of the FCPE repository and is the export source used here. The exporter reads the ONNX initializers directly β no Python, PyTorch, or ONNX Runtime is required.
One-Step Conversion
./convert.sh CKPT_ROOT
This regenerates fcpe.bpk at the repository root and removes the temporary artifact directory when finished.
Download the Upstream Files
mkdir -p CKPT_ROOT/FCPE
curl -L -o CKPT_ROOT/FCPE/fcpe.onnx \
https://huggingface.co/niobures/FCPE/resolve/main/onnx/fcpe.onnx
Export Raw Tensors and Manifest
If you want to run the steps manually instead of using ./convert.sh:
Example:
cargo run --release --bin export_fcpe_raw -- \
--checkpoint-root CKPT_ROOT \
--fcpe-subdir FCPE \
--output-root artifacts/fcpe
This produces:
artifacts/fcpe/fcpe_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 fcpe-burn -- \
--manifest artifacts/fcpe/fcpe_raw_f32/manifest.json \
--output artifacts/fcpe/fcpe.bpk
Verify the Archive
cargo run --release --bin check_fcpe_bpk -- fcpe.bpk
Notes
- This repository is a model artifact and conversion repo, not a complete inference application.
- The generated FP32 manifest references FP32 tensors; the 11 integer tensors are shapes/constants kept as
int64. - The repository includes the large Burn archive directly, so Git LFS configuration in
.gitattributesis part of the expected publishable layout.
License
This conversion is distributed under the MIT License, matching the upstream CNChTu/FCPE license. Upstream copyright: (c) 2023 CN_ChiTu. See LICENSE for the full text.
Model tree for maolandaw/FCPE-burn
Base model
niobures/FCPE