print dataset index in making buckets

This commit is contained in:
Kohya S
2023-03-01 21:30:12 +09:00
parent 089a63c573
commit d1d7d432e9
2 changed files with 5 additions and 4 deletions

View File

@@ -419,7 +419,8 @@ def generate_dataset_group_by_blueprint(dataset_group_blueprint: DatasetGroupBlu
print(info) print(info)
# make buckets first because it determines the length of dataset # make buckets first because it determines the length of dataset
for dataset in datasets: for i, dataset in enumerate(datasets):
print(f"[Dataset {i}]")
dataset.make_buckets() dataset.make_buckets()
return DatasetGroup(datasets) return DatasetGroup(datasets)

View File

@@ -1054,9 +1054,9 @@ class DatasetGroup(torch.utils.data.ConcatDataset):
for dataset in self.datasets: for dataset in self.datasets:
dataset.add_replacement(str_from, str_to) dataset.add_replacement(str_from, str_to)
def make_buckets(self): # def make_buckets(self):
for dataset in self.datasets: # for dataset in self.datasets:
dataset.make_buckets() # dataset.make_buckets()
def cache_latents(self, vae): def cache_latents(self, vae):
for dataset in self.datasets: for dataset in self.datasets: