Bug fixes. Added some functionality to help with private extensions

This commit is contained in:
Jaret Burkett
2023-10-05 07:09:34 -06:00
parent 579650eaf8
commit f73402473b
8 changed files with 99 additions and 20 deletions

View File

@@ -478,6 +478,7 @@ def get_dataloader_from_datasets(
datasets = []
has_buckets = False
is_caching_latents = False
dataset_config_list = []
# preprocess them all
@@ -497,6 +498,8 @@ def get_dataloader_from_datasets(
datasets.append(dataset)
if config.buckets:
has_buckets = True
if config.cache_latents or config.cache_latents_to_disk:
is_caching_latents = True
else:
raise ValueError(f"invalid dataset type: {config.type}")
@@ -512,6 +515,9 @@ def get_dataloader_from_datasets(
)
return batch
# check if is caching latents
if has_buckets:
# make sure they all have buckets
for dataset in datasets: