From 829fb29eeda62d7d148359e7be2b505306d9eb54 Mon Sep 17 00:00:00 2001 From: Simon Kirsten Date: Sat, 22 Oct 2022 22:50:58 +0200 Subject: [PATCH] Enable multi-process DataLoader for dreambooth --- examples/dreambooth/train_dreambooth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreambooth/train_dreambooth.py b/examples/dreambooth/train_dreambooth.py index 635166fb4081..f427caee646b 100644 --- a/examples/dreambooth/train_dreambooth.py +++ b/examples/dreambooth/train_dreambooth.py @@ -473,7 +473,7 @@ def collate_fn(examples): return batch train_dataloader = torch.utils.data.DataLoader( - train_dataset, batch_size=args.train_batch_size, shuffle=True, collate_fn=collate_fn + train_dataset, batch_size=args.train_batch_size, shuffle=True, collate_fn=collate_fn, num_workers=1 ) # Scheduler and math around the number of training steps.