sxl142 / TEx-Face

33 stars 2 forks source link

No such file or directory: './outputs/output.pt' #4

Open ljcccccccccccccccccc opened 6 months ago

ljcccccccccccccccccc commented 6 months ago

您好 在运行 python scripts/gen_videos.py的时候,出现了 No such file or directory: './outputs/output.pt'的错误,我没有这个文件,不知道您能不能帮忙解决 No such file or directory: './outputs/output.pt' ![Uploading image.png…]()

sxl142 commented 6 months ago

你跑python scripts/infer.py这一步了吗?

ljcccccccccccccccccc commented 6 months ago

你跑python scripts/infer.py这一步了吗?

是的,我把batchsize改成了4,运行成功了,在output目录下也生成了一个png,但是没有生成pt文件

sxl142 commented 6 months ago

那你自己改下保存pt文件的路径吧

ljcccccccccccccccccc commented 6 months ago

那你自己改下保存pt文件的路径吧

可是我在代码中没有看到保存pt文件的代码,您能否指明一下

sxl142 commented 6 months ago

torch.save(w, os.path.join(test_opts.output_dir, 'output.pt')) 加在保存图片后面

ljcccccccccccccccccc commented 6 months ago

torch.save(w, os.path.join(test_opts.output_dir, 'output.pt')) 加在保存图片后面

运行成功啦!谢谢!

arunsandy1309 commented 1 month ago

I have been facing the same issue, only the png file is generated in the outputs directory but not the "ouput.pt" file... I have added the above code after saving the image. image

But still I can only see the png file, no .pt file is generated. Can you let me know where I went wrong.