iperov / DeepFaceLab

DeepFaceLab is the leading software for creating deepfakes.
GNU General Public License v3.0
16.36k stars 26 forks source link

Deleting the latest model using 6) train SAEHD fails with a permission error deleting autobackups #960

Open Poikilos opened 3 years ago

Poikilos commented 3 years ago

Expected behavior

Delete a model.

Actual behavior

[0] : REDACTED3 - latest [1] : REDACTED2 [2] : REDACTED1 : d d Enter the name of the model you want to delete : REDACTED3 REDACTED3 Error: [WinError 5] Access is denied: 'C:\PortableApps\DeepFaceLab\DeepFaceLab_NVIDIA\workspace\model\REDACTED3_SAEHD_autobackups' Traceback (most recent call last): File "C:\PortableApps\DeepFaceLab\DeepFaceLab_NVIDIA_internal\DeepFaceLab\mainscripts\Trainer.py", line 57, in trainerThread debug=debug, File "C:\PortableApps\DeepFaceLab\DeepFaceLab_NVIDIA_internal\DeepFaceLab\models\ModelBase.py", line 116, in init filepath.unlink() File "pathlib.py", line 1284, in unlink File "pathlib.py", line 387, in wrapped PermissionError: [WinError 5] Access is denied: 'C:\PortableApps\DeepFaceLab\DeepFaceLab_NVIDIA\workspace\model\REDACTED3_SAEHD_autobackups'



Python sometimes has Windows errors like this such as if a directory is not empty but I'm not sure if this is the same. It has been a while since I've had an issue like that in Python.

## Steps to reproduce
(I only ever used one user, never ran elevated, but it still has a permission error)
- Run "6) train SAEHD" (I trained 3 total models)
- Cancel/save training
- Run "6) train SAEHD" again, but press d for delete, and type the name of the latest model (see above).

## Other relevant information
- **Operating system and version:** Windows 10
- using pre-built Windows binary
SilviaCorrao commented 3 years ago

Have you found any solution? I have the same error, but while I am trying to train my only model.

Poikilos commented 3 years ago

I think deleting the backups manually allowed me to continue. However, doing so may prevent continuing from where you left off.