aik2mlj / polyffusion

Polyffusion: A Diffusion Model for Polyphonic Score Generation with Internal and External Controls
https://polyffusion.github.io
MIT License
69 stars 7 forks source link

Is there a way to create just melody? #7

Open JiyeongCha opened 1 month ago

JiyeongCha commented 1 month ago

And can you share the ckpt of pnotree?

aik2mlj commented 1 month ago

Hi Jiyeong,

Currently, the model is unable to target monophonic generation (i.e., melody) given a checkpoint trained on polyphonic dataset. However, you can train the model on a melody dataset, so that the generation would likely be melody as well. To achieve this with the built-in POP909 dataset, use the argument --pop909_use_track=0 to select only the melody track for training. For example:

python polyffusion/main.py --model=sdf_chd8bar --output_dir=result/sdf_chd8bar --pop909_use_track=0

Please pull the last commit 1bd4bef0cc438cb9cbdb5a91ec2020d59f6bc8a1 where I fixed a bug regarding this.

Or, you can specify a custom melody dataset using the --data_dir argument.

As for the ckpt of pnotree, I regret to tell that I don't have it at hand. If this is a must, kindly write to me on this matter.