Skip to content

Commit 8332c1a

Browse files
authored
Enable multi-process DataLoader for dreambooth (huggingface#950)
1 parent bd06dd0 commit 8332c1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/dreambooth/train_dreambooth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def collate_fn(examples):
502502
return batch
503503

504504
train_dataloader = torch.utils.data.DataLoader(
505-
train_dataset, batch_size=args.train_batch_size, shuffle=True, collate_fn=collate_fn
505+
train_dataset, batch_size=args.train_batch_size, shuffle=True, collate_fn=collate_fn, num_workers=1
506506
)
507507

508508
# Scheduler and math around the number of training steps.

0 commit comments

Comments
 (0)