--- license: mit tags: - audio - music-source-separation - demucs - onnx - onnxruntime-web - webgpu --- # KRANK models Stem-separation models used by KRANK, a browser beat tool. Everything runs in the user's browser with onnxruntime-web; audio never leaves the device. These are mirrors of MIT-licensed work, kept here so the app does not depend on third-party repositories staying online. ## `htdemucs/`: drums / bass / other / vocals Unmodified mirror of [monteslu/htdemucs-web-onnx](https://huggingface.co/monteslu/htdemucs-web-onnx) (revision `a4a57cc0cf707e5b9a3e6ad3c2c4b21fcbe608c1`): Meta's [htdemucs](https://github.com/facebookresearch/demucs) exported as a 21-piece mixed-precision ONNX chain for WebGPU. See that repository for the run instructions. MIT. htdemucs by Alexandre Défossez et al., Meta AI. ## `drumsep/drumsep_w16.onnx`: kick / snare / cymbals / toms Derived from [inagoy/drumsep](https://github.com/inagoy/drumsep) (MIT, © 2023 inagoy), a Hybrid Demucs model for drum-kit separation, via the ONNX export in [splitzo/drumsep](https://huggingface.co/splitzo/drumsep) (revision `f510fb1dbdd968e3218f64e8d7ac1af0fafdb6e2`, MIT). Two changes: 1. The four `EyeLike` nodes that build boolean attention masks now build them in float and cast to bool, because onnxruntime has no boolean `EyeLike` kernel. Output is unchanged. 2. Large weight tensors are stored as float16 and cast to float32 when the session loads. The original checkpoint was saved in half precision, so outputs are bit-identical to the 335 MB float32 export; the file is 168 MB. Inputs and outputs match splitzo/drumsep: `waveform` [1, 2, 1764000] (40 s, 44.1 kHz stereo) and `magnitude` [1, 4, 2048, 1723] (normalised STFT, n_fft 4096, hop 1024, real/imag per channel) in; `freq_output` and `time_output` out, combined with the standard Demucs iSTFT post-processing. ## License MIT, matching every upstream source. Copyright notices: - Demucs / htdemucs: Copyright (c) Meta Platforms, Inc. and affiliates. - drumsep: Copyright (c) 2023 inagoy.