Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
default model
Browse files Browse the repository at this point in the history
  • Loading branch information
adefossez committed Nov 9, 2021
1 parent fbbce32 commit 36f4991
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ Other pre-trained models can be selected with the `-n` flag.
The list of pre-trained models is:
- `mdx`: trained only on MusDB HQ, winning model on track A at the [MDX][mdx] challenge.
- `mdx_extra`: trained with extra training data (including MusDB test set), ranked 2nd on the track B
of the [MDX][mdx] challenge. This is the default one.
- `mdx_q, mdx_extra_q`: quantized version of the previous models. Smaller download and storage
but quality can be slightly worse.
of the [MDX][mdx] challenge.
- `mdx_q`, `mdx_extra_q`: quantized version of the previous models. Smaller download and storage
but quality can be slightly worse. `mdx_extra_q` is the default model used.
- `SIG`: where `SIG` is a single model from the [model zoo](docs/training.md#model-zoo).

The `--shifts=SHIFTS` performs multiple predictions with random shifts (a.k.a the *shift trick*) of the input and average them. This makes prediction `SHIFTS` times
Expand Down Expand Up @@ -221,4 +221,4 @@ Demucs is released under the MIT license as found in the [LICENSE](LICENSE) file
[mdx]: https://www.aicrowd.com/challenges/music-demixing-challenge-ismir-2021
[kuielab]: https://github.com/kuielab/mdx-net-submission
[decouple]: https://arxiv.org/abs/2109.05418
[mdx_submission]: https://github.com/adefossez/mdx21_demucs
[mdx_submission]: https://github.com/adefossez/mdx21_demucs
2 changes: 2 additions & 0 deletions conf/variant/finetune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ augment:
scale:
proba: 0
shift_same: true
remix:
proba: 0
7 changes: 3 additions & 4 deletions demucs/pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ def demucs_unittest():
def add_model_flags(parser):
group = parser.add_mutually_exclusive_group(required=False)
group.add_argument("-s", "--sig", help="Locally trained XP signature.")
group.add_argument("-n", "--name", default="mdx_extra",
help="Pretrained model name or signature. Default is mdx_extra.")
group.add_argument("-n", "--name", default="mdx_extra_q",
help="Pretrained model name or signature. Default is mdx_extra_q.")
parser.add_argument("--repo", type=Path,
help="Folder containing all pre-trained models for use with -n.")


def get_model(name: tp.Optional[str] = None,
def get_model(name: str,
repo: tp.Optional[Path] = None):
"""`name` must be a bag of models name or a pretrained signature
from the remote AWS model repo or the specified local repo if `repo` is not None.
"""
assert name is not None
if name == 'demucs_unittest':
return demucs_unittest()
model_repo: ModelOnlyRepo
Expand Down
4 changes: 4 additions & 0 deletions demucs/remote/files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ e51eebcc-c1b80bdd.th
b72baf4e-8778635e.th
42e558d4-196e0e1b.th
305bc58f-18378783.th
14fc6a69-a89dd0ee.th
464b36d7-e5a9386e.th
7fd6ef75-a905dd85.th
83fc094f-4a16d450.th
4 changes: 2 additions & 2 deletions docs/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ git clone -b main --single-branch https://github.com/facebookresearch/demucs ./d
cd ./demucs
conda env update -f environment-cpu.yml
conda activate demucs
python.exe -m pip install -e .
demucs -d cpu "PATH_TO_AUDIO_FILE_1" ["PATH_TO_AUDIO_FILE_2" ...]
```

The `"` around the filename are required if the path contains spaces.
The separated files will be under `C:\Users\YOUR_USERNAME\demucs\separated\demucs\`. The next time you want to use Demucs, start again the [Anaconda prompt][prompt] and simply run
```bash
cd %HOMEPATH%
conda activate demucs
cd demucs
demucs -d cpu "PATH_TO_AUDIO_FILE_1" ...
```

Expand All @@ -34,6 +33,7 @@ cd %HOMEPATH%
cd demucs
git pull
conda env update -f environment-cpu.yml
python.exe -m pip install -e .
```

## Potential errors
Expand Down

0 comments on commit 36f4991

Please sign in to comment.