diff options
author | Volpeon <git@volpeon.ink> | 2022-10-03 17:38:44 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-10-03 17:38:44 +0200 |
commit | f23fd5184b8ba4ec04506495f4a61726e50756f7 (patch) | |
tree | d4c5666b291316ed95437cc1c917b03ef3b679da /data/textual_inversion | |
parent | Added negative prompt support for training scripts (diff) | |
download | textual-inversion-diff-f23fd5184b8ba4ec04506495f4a61726e50756f7.tar.gz textual-inversion-diff-f23fd5184b8ba4ec04506495f4a61726e50756f7.tar.bz2 textual-inversion-diff-f23fd5184b8ba4ec04506495f4a61726e50756f7.zip |
Small perf improvements
Diffstat (limited to 'data/textual_inversion')
-rw-r--r-- | data/textual_inversion/csv.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/textual_inversion/csv.py b/data/textual_inversion/csv.py index 64f0c28..852b1cb 100644 --- a/data/textual_inversion/csv.py +++ b/data/textual_inversion/csv.py | |||
@@ -60,8 +60,8 @@ class CSVDataModule(pl.LightningDataModule): | |||
60 | placeholder_token=self.placeholder_token, center_crop=self.center_crop) | 60 | placeholder_token=self.placeholder_token, center_crop=self.center_crop) |
61 | val_dataset = CSVDataset(self.data_val, self.tokenizer, size=self.size, interpolation=self.interpolation, | 61 | val_dataset = CSVDataset(self.data_val, self.tokenizer, size=self.size, interpolation=self.interpolation, |
62 | placeholder_token=self.placeholder_token, center_crop=self.center_crop) | 62 | placeholder_token=self.placeholder_token, center_crop=self.center_crop) |
63 | self.train_dataloader_ = DataLoader(train_dataset, batch_size=self.batch_size, shuffle=True) | 63 | self.train_dataloader_ = DataLoader(train_dataset, batch_size=self.batch_size, pin_memory=True, shuffle=True) |
64 | self.val_dataloader_ = DataLoader(val_dataset, batch_size=self.batch_size) | 64 | self.val_dataloader_ = DataLoader(val_dataset, batch_size=self.batch_size, pin_memory=True) |
65 | 65 | ||
66 | def train_dataloader(self): | 66 | def train_dataloader(self): |
67 | return self.train_dataloader_ | 67 | return self.train_dataloader_ |