Skip to content

Commit

Permalink
feat(train): make num_workers configurable (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
34j authored Apr 13, 2023
1 parent 432f89b commit e8df714
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"fft_sizes": [768, 1366, 342],
"hop_sizes": [60, 120, 20],
"win_lengths": [300, 600, 120],
"window": "hann_window"
"window": "hann_window",
"num_workers": 4
},
"data": {
"training_files": "filelists/44k/train.txt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"use_sr": true,
"max_speclen": 512,
"port": "8001",
"keep_ckpts": 3
"keep_ckpts": 3,
"num_workers": 4
},
"data": {
"training_files": "filelists/44k/train.txt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"use_sr": true,
"max_speclen": 512,
"port": "8001",
"keep_ckpts": 3
"keep_ckpts": 3,
"num_workers": 4
},
"data": {
"training_files": "filelists/44k/train.txt",
Expand Down
2 changes: 1 addition & 1 deletion src/so_vits_svc_fork/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def train_dataloader(self):
return DataLoader(
self.train_dataset,
# pin_memory=False,
num_workers=min(cpu_count(), 4),
num_workers=min(cpu_count(), self.__hparams.train.get("num_workers", 4)),
batch_size=self.__hparams.train.batch_size,
collate_fn=self.collate_fn,
)
Expand Down

0 comments on commit e8df714

Please sign in to comment.