Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repetition_penalty parameter function #58

Open
wang-TJ-20 opened this issue Feb 8, 2025 · 2 comments
Open

repetition_penalty parameter function #58

wang-TJ-20 opened this issue Feb 8, 2025 · 2 comments

Comments

@wang-TJ-20
Copy link

I found that the generated songs have repeated rhythms. Do I need to adjust the repetition_penalty parameter?

Here are the songs I generated:
Children’s-Song-Piano-children-童声-happy-vocal_tp0@93_T1@0_rp1@1_maxtk3000_5b63ca1e-d94f-42e6-84c6-578e51378613_mixed.mp3.zip

This is my lyrics
一二三四五六七,森林里面真欢喜。
小兔子呀白又白,两只耳朵竖起来。
蹦蹦跳跳真可爱,爱吃萝卜和青菜。

cd YuE/inference/
python infer.py \
    --cuda_idx 0 \
    --stage1_model m-a-p/YuE-s1-7B-anneal-en-cot \
    --stage2_model m-a-p/YuE-s2-1B-general \
    --genre_txt ../prompt_egs/genre.txt \
    --lyrics_txt ../prompt_egs/lyrics.txt \
    --run_n_segments 2 \
    --stage2_batch_size 4 \
    --output_dir ../output \
    --max_new_tokens 3000 \
    --repetition_penalty 1.1

@a43992899
Copy link
Collaborator

a43992899 commented Feb 8, 2025

Please use zh ckpt instead of en ckpt for Chinese songs.

As I said in your previous issue, YuE does support children’s songs; please refer to our demo page for more details. However, this genre is a bit niche, so I would recommend using ICL for more stable results.

Feel free to adjust repetition penalty to 1.2.

请使用中文ckpt,并且开启ICL模式获得更稳定的结果。儿歌是支持的,但是他是一个尾部风格,需要更多的提示词工程。可以尝试调大重复惩罚看有没有收益。

@teressawang
Copy link

seems that the en cot ckpt of the model performs better than the Chinese cot ckpt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants