Add dataset flag to cache the raw tensors

This commit is contained in:
Jaret Burkett committed 2026-08-04 15:32:48 -06:00
1 parent 8a0bcf1ffe
commit 00a93e3830
3 files changed
+65 -1

No files matched your search

+5 -1
View File
@@ -224,7 +224,11 @@ class DataLoaderBatchDTO:
self.num_frames: int = self.file_items[0].num_frames
if not is_latents_cached or self.file_items[0].dataset_config.load_image_when_caching_latents:
if (
not is_latents_cached
or self.file_items[0].dataset_config.load_image_when_caching_latents
or self.file_items[0].dataset_config.cache_tensors_to_disk
):
# only return a tensor if latents are not cached, or if we are explicitly
# loading the raw image alongside the cached latents
self.tensor: torch.Tensor = torch.cat(