SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: './checkpoints\\epoch_20.pth'

Open yh-hao opened this issue 11 months ago • 7 comments

运行显示“FileNotFoundError: [Errno 2] No such file or directory: './checkpoints\epoch_20.pth'”

yh-hao avatar Jul 07 '23 02:07 yh-hao

Do you have the File "epoch_20.pth" in "INSTALL FOLDER/checkpoints/" ? Might wanna check that first.

TripleKiller666 avatar Jul 07 '23 16:07 TripleKiller666

你需要从作者提供的下载地址里(谷歌云盘或者百度网盘)下载下来放到插件目录指定位置处

hitzhangjie avatar Jul 08 '23 16:07 hitzhangjie

the file can be fetched from the # lagency download link in https://github.com/OpenTalker/SadTalker/blob/main/scripts/download_models.sh i.e.

wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/epoch_20.pth -O ./checkpoints/epoch_20.pth

penolove avatar Jul 26 '23 16:07 penolove

New installation: Same problem. Why hasn't it been it solved?

sbersier avatar Aug 23 '23 21:08 sbersier

same question here

kinoee avatar Aug 28 '23 08:08 kinoee

the file can be fetched from the # lagency download link in https://github.com/OpenTalker/SadTalker/blob/main/scripts/download_models.sh i.e.

wget -nc https://github.com/Winfredy/SadTalker/releases/download/v0.0.2/epoch_20.pth -O ./checkpoints/epoch_20.pth

This is the solution, if you're using either the old_version with old_version=True when running inference.py or if you haven't downloaded the new safetensors checkpoints.

Either that or the checkpoints file you downloaded aren't in the correct path, if you're going to use "safetensors" by default.

Specifically, my problem was the safetensors were downloaded into ".checkpoints" instead of "checkpoints" folder.

def init_path(checkpoint_dir, config_dir, size=512, old_version=False, preprocess='crop'):

radu-gheorghiu avatar Sep 03 '23 18:09 radu-gheorghiu

window system put epoch_20.pth file to where folder?

plane55 avatar Apr 13 '24 14:04 plane55