Closed MuruganR96 closed 1 year ago
I fixed the issue. it's my mistake. this change is worked
consume_prefix_in_state_dict_if_present(checkpoint["acoustic-model"], "module.")
def _acoustic(
name: str,
discrete: bool,
upsample: bool,
pretrained: bool = True,
progress: bool = True,
) -> AcousticModel:
acoustic = AcousticModel(discrete, upsample)
if pretrained:
# checkpoint = torch.hub.load_state_dict_from_url(URLS[name], progress=progress)
checkpoint = torch.load("/root/Experiments/soft-vc/acoustic-model-0.1/finetuned_checkpoints/model-best.pt")
consume_prefix_in_state_dict_if_present(checkpoint["acoustic-model"], "module.")
acoustic.load_state_dict(checkpoint["acoustic-model"])
acoustic.eval()
return acoustic
@bshall Thank you for this great work.
I did fine-tune the pre-trained acoustic LJSpeech model with my custom dataset (~ 1 hour).
python train.py --resume checkpoints/hubert-soft-0321fd7e.pt data/ finetuned_checkpoints/
I have newly fine-tuned the best model (model-best.pt) with 20000 steps. I modified the code (https://github.com/bshall/acoustic-model/blob/main/acoustic/model.py#L119). the loading from the torch.hub.load_state_dict_from_url to my checkpoint path. but I got the below error. I shared the error log for your reference.
can you please help me, how to resolve this issue?
Thanks