Skip to content

Commit 040e26f

Browse files
committedApr 21, 2024
Regenerate failed file
If a latent file fails to load, print out the path and the error, then return false to regenerate it
1 parent feefcf2 commit 040e26f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎library/train_util.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2135,8 +2135,10 @@ def is_disk_cached_latents_is_expected(reso, npz_path: str, flip_aug: bool):
21352135
return False
21362136
if npz["latents_flipped"].shape[1:3] != expected_latents_size:
21372137
return False
2138-
except:
2139-
raise RuntimeError(f"Error loading file: {npz_path}")
2138+
except Exception as e:
2139+
print(npz_path)
2140+
print(e)
2141+
return False
21402142

21412143
return True
21422144

0 commit comments

Comments
 (0)