Open light100bc opened 1 year ago
INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/G_latest.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/D_latest.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/G_31000.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/D_31000.pth oldest_checkpoint_path:././OUTPUT_MODEL/G_30600.pth oldest_checkpoint_path:././OUTPUT_MODEL/D_30600.pth remove ././OUTPUT_MODEL/G_30600.pth remove ././OUTPUT_MODEL/D_30600.pth Maximum epoch reached, closing training... 0%| | 0/124 [00:09<?, ?it/s]None Traceback (most recent call last): File "finetune_speaker_v2.py", line 372, in main() File "finetune_speaker_v2.py", line 55, in main mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,)) File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 239, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 197, in start_processes while not context.join(): File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 149, in join raise ProcessExitedException( torch.multiprocessing.spawn.ProcessExitedException: process 0 terminated with exit code 1
我finetune最后结束后是这样的,是这个出错的原因嘛。。。但不知道该怎么办T-T。有人能帮忙解释一下该怎么办嘛
Maximum epoch reached, closing training... 你自己设置的最大epoch达到了,他自动暂停了
cp ./configs/modified_finetune_speaker.json ./finetune_speaker.json python3 VC_inference.py --model_dir ./OUTPUT_MODEL/G_latest.pth --share True
新的config是在modified_finetune_speaker.json, 确认存在OUTPUT_MODEL/G_latest.pth就是保存成功了
从下面VC_inference.py文件的代码中可以看到配置文件的默认路径是 ./finetune_speaker.json
parser = argparse.ArgumentParser()
parser.add_argument("--model_dir", default="./G_latest.pth", help="directory to your fine-tuned model")
parser.add_argument("--config_dir", default="./finetune_speaker.json", help="directory to your model config file")
正常训练完成会在OUTPUT_MODEL文件夹内生成config.json ,我们只需在运行时指定config文件路径即可。 使用下面命令运行
python VC_inference.py --model_dir ./OUTPUT_MODEL/G_latest.pth --config_dir ./OUTPUT_MODEL/config.json
或者直接修改运行文件VC_inference.py内代码,将其修改为
parser = argparse.ArgumentParser()
parser.add_argument("--model_dir", default="./OUTPUT_MODEL/G_latest.pth", help="directory to your fine-tuned model")
parser.add_argument("--config_dir", default="./OUTPUT_MODEL/config.json", help="directory to your model config file")
然后使用下面命令运行
python VC_inference.py
INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/G_latest.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/D_latest.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/G_31000.pth INFO:OUTPUT_MODEL:Saving model and optimizer state at iteration 251 to ././OUTPUT_MODEL/D_31000.pth oldest_checkpoint_path:././OUTPUT_MODEL/G_30600.pth oldest_checkpoint_path:././OUTPUT_MODEL/D_30600.pth remove ././OUTPUT_MODEL/G_30600.pth remove ././OUTPUT_MODEL/D_30600.pth Maximum epoch reached, closing training... 0%| | 0/124 [00:09<?, ?it/s]None Traceback (most recent call last): File "finetune_speaker_v2.py", line 372, in
main()
File "finetune_speaker_v2.py", line 55, in main
mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 239, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 197, in start_processes
while not context.join():
File "/home/maikaka/anaconda3/envs/test/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 149, in join raise ProcessExitedException(
torch.multiprocessing.spawn.ProcessExitedException: process 0 terminated with exit code 1
我finetune最后结束后是这样的,我知道max epoch达到了,但为什么exit code是1呢?而且没有生成finetune_speaker.json,也就是没有新角色可以选择。旧的finetune_speaker.json(在config下),也不会显示新增的角色,导致UI也没法选我新训练的角色
环境:cuda 11.8, torch 2.0.1, pyopenjtalk装不上0.1.3装的最新的。