nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
9.56k stars 1.31k forks source link

fix: saving ckpt error when ckpt folder has some folder inside #3516

Closed Crescent-Saturn closed 1 week ago

Crescent-Saturn commented 2 weeks ago

When save_only_latest_checkpoint is True, it tried to delete everything in the chekpoint folder before saving the latest checkpoint.

Since it is supposed that the nerfstudio_models only has checkpoint files inside, when there are some other customized saved folders inside, there will be an error.

This change will list *.ckpt files only instead of everything (include folder) to be compared with latest checkpoint file before deleting.

Thanks for your consideration