---
title: Demucs-Repackage
canonical_url: "https://www.modelscope.cn/models/DiffSynth-Studio/Demucs-Repackage"
md_url: "https://www.modelscope.cn/models/DiffSynth-Studio/Demucs-Repackage.md"
repository: DiffSynth-Studio/Demucs-Repackage
chinese_name: "Demucs 音轨分离"
last_updated: 2026-06-16
license: "Apache License 2.0"
pipeline_tag: speech-separation
tasks:
  - speech-separation
base_model_relation: finetune
parameters: 42.0M
tensor_type:
  - F16
library_name:
  - pytorch
  - safetensors
frameworks:
  - Pytorch
downloads: 252
stars: 2
---

# Demucs-Repackage

> Demucs-Repackage - DiffSynth-Studio 在 ModelScope 开源的模型。本模型用于提取音乐中的人声部分，转载自 https://github.com/facebookresearch/demucs

DiffSynth-Studio/Demucs-Repackage 是 ModelScope 魔搭社区上的 42.0M 参数speech-separation模型，采用 Apache License 2.0 许可。

- **Repository**: DiffSynth-Studio/Demucs-Repackage
- **License**: Apache License 2.0
- **Tasks**: speech-separation
- **Parameters**: 42.0M
- **Downloads**: 252
- **Stars**: 2
- **Last updated**: 2026-06-16

Source: https://www.modelscope.cn/models/DiffSynth-Studio/Demucs-Repackage

---

# Demucs 音轨分离

本模型用于提取音乐中的人声部分，转载自 https://github.com/facebookresearch/demucs

## 模型效果

输入：

<audio controls>
  <source src="music_input.wav" type="audio/wav">
</audio>

输出：

<audio controls>
  <source src="music_output.wav" type="audio/wav">
</audio>

## 推理代码

安装 [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio)：

```shell
git clone https://github.com/modelscope/DiffSynth-Studio.git  
cd DiffSynth-Studio
pip install -e .
```

推理代码：

```python
from diffsynth.utils.demucs import AudioTrackSeparator
from diffsynth import ModelConfig
from modelscope import snapshot_download
import torch, torchaudio

model = AudioTrackSeparator(
    torch_dtype=torch.float32,
    device="cuda",
    model_config=ModelConfig(model_id="DiffSynth-Studio/Demucs-Repackage", origin_file_pattern="model.safetensors")
)
snapshot_download("DiffSynth-Studio/Demucs-Repackage", allow_file_pattern="music_input.wav", local_dir="data")
music = torchaudio.load("data/music_input.wav")
vocals = model(music, target_sample_rate=48000)
torchaudio.save("music_output.wav", vocals, 48000)
```
