Closed xiangmy21 closed 7 months ago
Could you please share the details of the files located in the '~/amphion/ckpts/tts/naturalspeech2_libritts/checkpoint/epoch-0089_step-0512912_loss-6.367693' folder?
There is only a soft link in /home/srt15/amphion/ckpts/tts/
,as the first capture shows.
now I deleted the soft link, and move the /home/srt15/naturalspeech2_libritts/
folder directly into /home/srt15/amphion/ckpts/tts/naturalspeech2_libritts/
,and it works. So I wonder why the soft link doesn't work.
In this situation, it seems to be related to the way Accelerate handles model loading. To potentially address this issue, you might consider introducing a piece of code before the model loading process. This additional step involves obtaining the actual path of the symlinked file. Here's a revised version of the code snippet:
path = [YOUR-SOFT-LINK-PATH]
# Resolve the actual path of the symlinked file
realpath = path if not os.path.islink(path) else os.readlink(path)
# Load the model using the resolved path
load_model(realpath)
Oh, God! Sorry, it's my problem. I add the soft link again and it works:
When using relative path to add soft link, the path should be based on the link path. Maybe I used the wrong relative path at first. Sorry for disturbing, and thanks for your help!
Problem Overview
I follow the https://huggingface.co/amphion/naturalspeech2_libritts and https://github.com/open-mmlab/Amphion/tree/main/egs/tts/NaturalSpeech2 to use NaturalSpeech2 for inference, but the soft link created by command
ln -s ../../../naturalspeech2_libritts ckpts/tts/
seems not work. It still reportFileNotFoundError: [Errno 2] No such file or directory: '~/amphion/ckpts/tts/naturalspeech2_libritts/checkpoint/epoch-0089_step-0512912_loss-6.367693/pytorch_model.bin'
Screenshots
I'm sure
/home/srt15/naturalspeech2/checkpoint/epoch-0089_step-0512912_loss-6.367693/pytorch_model.bin
is existent.