From a9594bb50aa361ff5f5a9f28f0a831dd287679a1 Mon Sep 17 00:00:00 2001 From: Jiasheng <43396544+JiashengLiu@users.noreply.github.com> Date: Tue, 28 May 2024 04:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=92=8C47=E8=A1=8C?= =?UTF-8?q?=E4=B8=80=E6=A0=B7=E7=9A=84=E4=B8=BA=E7=9B=B8=E5=AF=B9root?= =?UTF-8?q?=E7=9A=84=E7=9B=AE=E5=BD=95=20(#249)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修改成和47行一样的为相对root的目录 修改成和47行一样的为相对root的目录,不然后面vits微调读不到数据,dataloader出来长度为0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tools/vqgan/create_train_split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vqgan/create_train_split.py b/tools/vqgan/create_train_split.py index ffbfbeb0..977afdf3 100644 --- a/tools/vqgan/create_train_split.py +++ b/tools/vqgan/create_train_split.py @@ -24,7 +24,7 @@ def main(root, val_ratio, val_count, filelist, min_duration, max_duration): files = list_files(root, AUDIO_EXTENSIONS, recursive=True, sort=True) if min_duration is None and max_duration is None: - filtered_files = list(map(str, files)) + filtered_files = list(map(str, [file.relative_to(root) for file in files])) else: filtered_files = [] for file in tqdm(files):