Initial upload of TorchScript model weights and documentation
Browse files- LICENSE +25 -0
- README.md +57 -0
- SHA256SUMS.txt +3 -0
- htdemucs_6s.pt +3 -0
- htdemucs_cpu.pt +3 -0
- htdemucs_ft.pt +3 -0
LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
WEIGHTS LICENSE WARNING: While the original code is MIT, these pre-trained weights are derived from research-only datasets. They are distributed under CC-BY-NC 4.0.
|
| 2 |
+
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
MIT License
|
| 6 |
+
|
| 7 |
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 8 |
+
|
| 9 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 10 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 11 |
+
in the Software without restriction, including without limitation the rights
|
| 12 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 13 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 14 |
+
furnished to do so, subject to the following conditions:
|
| 15 |
+
|
| 16 |
+
The above copyright notice and this permission notice shall be included in all
|
| 17 |
+
copies or substantial portions of the Software.
|
| 18 |
+
|
| 19 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 20 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 21 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 22 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 23 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 24 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 25 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- audio-separation
|
| 5 |
+
- demucs
|
| 6 |
+
- libtorch
|
| 7 |
+
- coreml
|
| 8 |
+
- metal
|
| 9 |
+
- ios
|
| 10 |
+
- macos
|
| 11 |
+
pipeline_tag: audio-source-separation
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# HTDemucs (LibTorch / CoreML Ready)
|
| 15 |
+
|
| 16 |
+
This repository contains **TorchScript (`.pt`)** exports of the [Hybrid Transformer Demucs (htdemucs)](https://github.com/facebookresearch/demucs) model by Meta Research.
|
| 17 |
+
|
| 18 |
+
These models are optimized for **C++ Inference** (using LibTorch) on Apple Silicon (Metal/MPS) and CPU.
|
| 19 |
+
|
| 20 |
+
## ⚠️ License & Attribution
|
| 21 |
+
|
| 22 |
+
* **Original Model Code:** MIT License (Copyright Meta Platforms, Inc.)
|
| 23 |
+
* **Pre-Trained Weights:** [CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (Research constraints derived from training data).
|
| 24 |
+
|
| 25 |
+
**Attribution:**
|
| 26 |
+
> Original work by **Meta Research**. Based on the paper "Hybrid Transformers for Music Source Separation" by Alexandre Défossez et al.
|
| 27 |
+
> Source Repository: [facebookresearch/demucs](https://github.com/facebookresearch/demucs)
|
| 28 |
+
|
| 29 |
+
**Disclaimer:**
|
| 30 |
+
> This is a **format conversion only**. No fine-tuning was performed. The weights are numerically identical to the original release, but packaged for C++ execution without Python dependencies.
|
| 31 |
+
|
| 32 |
+
## Model Variants
|
| 33 |
+
|
| 34 |
+
| Filename | Description | Chunk Size | Target Device |
|
| 35 |
+
| :--- | :--- | :--- | :--- |
|
| 36 |
+
| `htdemucs_ft.pt` | **Fast Trace** (Recommended) | 8.0s | Metal (MPS) / GPU |
|
| 37 |
+
| `htdemucs_6s.pt` | **6-Stem** (Guitar/Piano) | 8.0s | Metal (MPS) / GPU |
|
| 38 |
+
| `htdemucs_cpu.pt` | CPU Fallback | 8.0s | CPU |
|
| 39 |
+
|
| 40 |
+
## Usage (C++)
|
| 41 |
+
|
| 42 |
+
These models are designed to be loaded directly in C++ using `torch::jit::load()`:
|
| 43 |
+
|
| 44 |
+
```cpp
|
| 45 |
+
#include <torch/script.h>
|
| 46 |
+
|
| 47 |
+
auto module = torch::jit::load("htdemucs_ft.pt");
|
| 48 |
+
module.to(torch::kMPS); // Or kCPU
|
| 49 |
+
module.eval();
|
| 50 |
+
|
| 51 |
+
// Input: [1, 2, Samples]
|
| 52 |
+
auto output = module.forward({input_tensor}).toTensor();
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Integrity
|
| 56 |
+
|
| 57 |
+
SHA256 checksums are provided in `SHA256SUMS.txt` to verify file integrity.
|
SHA256SUMS.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
26422280a8ae71a232b0db52e07cd6e60f6e35bf4094e35711f3b36e6bf0d42b htdemucs_6s.pt
|
| 2 |
+
534b8bb5700fd7199c519a9fc395fd277418f4d8baaf917924965e0b1afeaeb6 htdemucs_cpu.pt
|
| 3 |
+
2bccb2bccb8310d1369440361f8541eee34a339eb55e436d19e7e0f45978289b htdemucs_ft.pt
|
htdemucs_6s.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26422280a8ae71a232b0db52e07cd6e60f6e35bf4094e35711f3b36e6bf0d42b
|
| 3 |
+
size 110534647
|
htdemucs_cpu.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:534b8bb5700fd7199c519a9fc395fd277418f4d8baaf917924965e0b1afeaeb6
|
| 3 |
+
size 168823853
|
htdemucs_ft.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2bccb2bccb8310d1369440361f8541eee34a339eb55e436d19e7e0f45978289b
|
| 3 |
+
size 168832923
|