Massive speed increase. Added latent caching both to disk and to memory

This commit is contained in:
Jaret Burkett committed 2023-09-10 08:54:49 -06:00
1 parent 41a3f63b72
commit 34bfeba229
10 files changed
+455 -109

No files matched your search

+9
View File
@@ -1,4 +1,13 @@
import gc
import torch
def value_map(inputs, min_in, max_in, min_out, max_out):
return (inputs - min_in) * (max_out - min_out) / (max_in - min_in) + min_out
def flush(garbage_collect=True):
torch.cuda.empty_cache()
if garbage_collect:
gc.collect()