Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions museformer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ The number `10240` indicates the maximum sequence length for calculation.

## 5. Inference

**To run inference only**, the [Dataset](https://github.com/microsoft/muzic/tree/main/museformer#1-dataset) and [Train](https://github.com/microsoft/muzic/tree/main/museformer#3-train) steps are unnecessary. Only these two steps are required:
- Ensure the environment settings of [Muzic](https://github.com/microsoft/muzic#requirements) and [Museformer](https://github.com/microsoft/muzic/tree/main/museformer#2-environment).
- Download the checkpoint [here](https://1drv.ms/u/s!Aq3YEPZCcV5ibz9ySjjNsEB74CQ) and put it in `checkpoints/mf-lmd6remi-1` for inference.

Use the following command to generate 5 music pieces, with the random seed set to 1:

```bash
Expand Down
12 changes: 12 additions & 0 deletions museformer/tgen/generation__mf-lmd6remi-x.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
DATA_DIR=data-bin/lmd6remi
MODEL_NAME=mf-lmd6remi-$1
DICT_SRC_PATH=data/meta/dict.txt
DICT_AIM_PATH=$DATA_DIR/dict.txt

if ! [ -d $DATA_DIR ]
then
mkdir -p $DATA_DIR
fi

if ! [ -f $DICT_AIM_PATH ]
then
cp $DICT_SRC_PATH $DICT_AIM_PATH
fi

OMP_NUM_THREADS=$(cat /proc/cpuinfo| grep "processor"| wc -l)
NUM_WORKERS=$OMP_NUM_THREADS
Expand Down