diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/csv.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/data/csv.py b/data/csv.py index 8637ac1..253ce9e 100644 --- a/data/csv.py +++ b/data/csv.py | |||
@@ -68,13 +68,12 @@ class CSVDataModule(pl.LightningDataModule): | |||
68 | item.nprompt if "nprompt" in item else "" | 68 | item.nprompt if "nprompt" in item else "" |
69 | ) | 69 | ) |
70 | for item in data | 70 | for item in data |
71 | if "skip" not in item or item.skip != "x" | ||
72 | for i in range(image_multiplier) | 71 | for i in range(image_multiplier) |
73 | ] | 72 | ] |
74 | 73 | ||
75 | def prepare_data(self): | 74 | def prepare_data(self): |
76 | metadata = pd.read_csv(self.data_file) | 75 | metadata = pd.read_csv(self.data_file) |
77 | metadata = list(metadata.itertuples()) | 76 | metadata = [item for item in metadata.itertuples() if "skip" not in item or item.skip != "x"] |
78 | num_images = len(metadata) | 77 | num_images = len(metadata) |
79 | 78 | ||
80 | valid_set_size = int(num_images * 0.2) | 79 | valid_set_size = int(num_images * 0.2) |