summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-10-22 16:56:10 +0200
committerVolpeon <git@volpeon.ink>2022-10-22 16:56:10 +0200
commit46b1eda6d1c7db552ce5c577bed101c61f09d55b (patch)
tree80840bbb5a57238b3dabae1d7fa2588a69f79dd9 /data
parentTraining update (diff)
downloadtextual-inversion-diff-46b1eda6d1c7db552ce5c577bed101c61f09d55b.tar.gz
textual-inversion-diff-46b1eda6d1c7db552ce5c577bed101c61f09d55b.tar.bz2
textual-inversion-diff-46b1eda6d1c7db552ce5c577bed101c61f09d55b.zip
Revert lat; fix skip attribute in dataset
Diffstat (limited to 'data')
-rw-r--r--data/csv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/csv.py b/data/csv.py
index 4c91ded..df15c5a 100644
--- a/data/csv.py
+++ b/data/csv.py
@@ -76,7 +76,7 @@ class CSVDataModule(pl.LightningDataModule):
76 76
77 def prepare_data(self): 77 def prepare_data(self):
78 metadata = pd.read_json(self.data_file) 78 metadata = pd.read_json(self.data_file)
79 metadata = [item for item in metadata.itertuples() if "skip" not in item or item.skip != True] 79 metadata = [item for item in metadata.itertuples() if not hasattr(item, "skip") or item.skip != True]
80 num_images = len(metadata) 80 num_images = len(metadata)
81 81
82 valid_set_size = int(num_images * 0.2) 82 valid_set_size = int(num_images * 0.2)