Regenerate failed file

If a latent file fails to load, print out the path and the error, then return false to regenerate it
This commit is contained in:
Cauldrath
2024-04-21 13:46:31 -04:00
parent feefcf256e
commit 040e26ff1d

View File

@@ -2135,8 +2135,10 @@ def is_disk_cached_latents_is_expected(reso, npz_path: str, flip_aug: bool):
return False return False
if npz["latents_flipped"].shape[1:3] != expected_latents_size: if npz["latents_flipped"].shape[1:3] != expected_latents_size:
return False return False
except: except Exception as e:
raise RuntimeError(f"Error loading file: {npz_path}") print(npz_path)
print(e)
return False
return True return True