Skip to content

Commit 4589a8c

Browse files
committed
Cleanup utmos thread / batch size
Signed-off-by: Fejgin, Roy <rfejgin@nvidia.com>
1 parent e66337b commit 4589a8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nemo/collections/tts/modules/utmosv2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __call__(self, file_path):
6262
mos_score = self.model.predict(input_path=file_path, num_repetitions=1, num_workers=0)
6363
return mos_score
6464

65-
def process_directory(self, input_dir: str, batch_size: int = 32) -> list[dict[str, str | float]]:
65+
def process_directory(self, input_dir: str, batch_size: int = 16) -> list[dict[str, str | float]]:
6666
"""
6767
Computes UTMOSv2 scores for all `*.wav` files in the given directory.
6868
Args:
@@ -76,7 +76,7 @@ def process_directory(self, input_dir: str, batch_size: int = 32) -> list[dict[s
7676
# while actually slowing down the prediction. Limit the number of threads here.
7777
with threadpool_limits(limits=1):
7878
results = self.model.predict(
79-
input_dir=input_dir, num_repetitions=1, num_workers=batch_size * 2, batch_size=batch_size
79+
input_dir=input_dir, num_repetitions=1, num_workers=batch_size, batch_size=batch_size
8080
)
8181
return results
8282

0 commit comments

Comments
 (0)