-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add fine-tuning scripts #680
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give the advice of file arranging first. As for the code, you should wrap more methods into classes to provide a good abstraction. I advice you to use the default log logging
and let user to decide the log instance, like what ChatTTS class did. If you agree with me, the log part of your code should be separated into tools/logger
and you can see an instance there. You can create another instance or modify that simple instance.
这里想请教下,如果想针对新的音色进行模型精调,是只训练spk_emb矩阵嘛?还是需要同时训练spk_emb,gpt相关模块呀? |
@gafield-liu 训练效果确实不太行,可能得调一调训练参数。我现在的只是随便写的 |
这里应该缺少了语音embedding的提取模块,随机初始化的话音色精调出来效果不行~ |
Thank you so much for your hard work and the fine-tuning. I found this project just a day ago, and I’m happy to say I was able to fine-tune without any errors using VDAE and GPTSpeakers I just tried the new update Merge branch '2noise'. today to Fine-tuning DVAE worked fine, but I got an error when trying to fine-tune GPT. Here’s the error message i get ChatTTS\utils\finetune\model.py", line 204, in get_hidden_states_and_labels I really appreciate all your work and would be grateful for any help with this error. Thanks again for your time! |
@fumiama Hi, just a status update that I've just got plenty of free time to work on this PR. Will have updates these days. I'll continue working on improving the training performance. |
Appreciate. I will do it at your next push that you fix the test. |
@fumiama The reason of failure is the test file import What's your suggestion about the compatibility? Shall we still support python<3.12 and uses Overall, my codes requires |
Well, if there's nothing MUST require |
@fumiama I suggest deprecating support for python 3.8, which doesn't support native typing As a reference, pytorch requires python>=3.9 since 2.5
|
Maybe you should use |
Will revert to python 3.8 style later. My current codes are heavily relying on match, |
Thanks for your understanding. Maybe you can split this PR into some independent parts and open a few PRs as long as those parts complete in order to avoid the sync-upstream work due to long time modification. |
Add fine-tuning scripts. The commands are provided at the top of each file.
There are a few items to note:
utils
directory or put scripts intoexamples
folder).https://github.com/2noise/ChatTTS/blob/0bef943d192cd1dd4067f83e16a93f19889b9a87/ChatTTS/utils/finetune/dataset.py
cc @fumiama