From 1f56a6140a08050bd36bc5eda8c04013353d53bf Mon Sep 17 00:00:00 2001 From: wataru Date: Wed, 17 May 2023 07:20:43 +0900 Subject: [PATCH] WIP: sample models --- .gitignore | 1 + server/MMVCServerSIO.py | 4 +-- server/ModelSample.py | 2 ++ server/samples.json | 56 +++++++++++++++++++++++++++++++++ server/voice_changer/RVC/RVC.py | 4 ++- 5 files changed, 64 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ee539ad0..f1ae6e37 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ server/weights/ server/weights_/ server/weights__/ server/models/ +server/samples.json start_trainer.sh # venv diff --git a/server/MMVCServerSIO.py b/server/MMVCServerSIO.py index 70c266ad..d42f4cbc 100755 --- a/server/MMVCServerSIO.py +++ b/server/MMVCServerSIO.py @@ -146,9 +146,9 @@ def download_no_tqdm(params): f.write(chunk) countToDot += 1 if countToDot % 1024 == 0: - print(".", end="") + print(".", end="", flush=True) - print("+", end="") + print("+", end="", flush=True) except Exception as e: print(e) diff --git a/server/ModelSample.py b/server/ModelSample.py index a2dfebe5..56bd7ec4 100644 --- a/server/ModelSample.py +++ b/server/ModelSample.py @@ -7,6 +7,8 @@ from const import ModelType @dataclass class RVCModelSample: id: str = "" + lang: str = "" + tag: str = "" name: str = "" modelUrl: str = "" indexUrl: str = "" diff --git a/server/samples.json b/server/samples.json index 183af64c..67bb83f6 100644 --- a/server/samples.json +++ b/server/samples.json @@ -2,6 +2,8 @@ "RVC": [ { "id": "KikotoKurage_Song", + "lang": "ja-JP", + "tag": "", "name": "黄琴海月(Song)", "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_kurage_song/KikotoKurage_Song.pth", "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_kurage_song/added_IVF2252_Flat_nprobe_10.index.bin", @@ -12,6 +14,8 @@ }, { "id": "KikotoKurage_Talk", + "lang": "ja-JP", + "tag": "", "name": "黄琴海月(Talk)", "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_kurage_talk/KikotoKurage_Talk.pth", "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_kurage_talk/added_IVF1022_Flat_nprobe_7.index.bin", @@ -22,6 +26,8 @@ }, { "id": "KikotoMahiro_Song", + "lang": "ja-JP", + "tag": "", "name": "黄琴まひろ(Song)", "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_mahiro_song/KikotoMahiro_Song.pth", "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_mahiro_song/added_IVF3621_Flat_nprobe_11.index.bin", @@ -32,6 +38,8 @@ }, { "id": "KikotoMahiro_Talk", + "lang": "ja-JP", + "tag": "", "name": "黄琴まひろ(Talk)", "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_mahiro_talk/KikotoMahiro_Talk.pth", "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/kikoto_mahiro_talk/added_IVF1591_Flat_nprobe_9.index.bin", @@ -39,6 +47,54 @@ "termOfUseUrl": "https://huggingface.co/wok000/vcclient_model/raw/main/rvc/kikoto_mahiro_talk/term_of_use.txt", "credit": "黄琴まひろ", "description": "" + }, + { + "id": "TokinaShigure", + "lang": "ja-JP", + "tag": "", + "name": "刻鳴時雨", + "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/tokina_sigure/Shigure.pth", + "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/tokina_sigure/added_IVF1572_Flat_nprobe_9.index.bin", + "featureUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/tokina_sigure/total_fea.npy", + "termOfUseUrl": "https://huggingface.co/wok000/vcclient_model/raw/main/rvc/tokina_sigure/term_of_use.txt", + "credit": "刻鳴時雨", + "description": "https://huggingface.co/yasyune/Shigure_Tokina_RVC" + }, + { + "id": "Amitaro_d", + "lang": "ja-JP", + "tag": "", + "name": "あみたろ(d)", + "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_default/amitaro_hubertjp_768_def-100.pth", + "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_default/amitaro_hubertjp_768_def.0.index.bin", + "featureUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_default/amitaro_hubertjp_768_def.0.big.npy", + "termOfUseUrl": "https://huggingface.co/wok000/vcclient_model/raw/main/rvc/amitaro_hubertjp_768_default/term_of_use.txt", + "credit": "あみたろ", + "description": "" + }, + { + "id": "Amitaro_n", + "lang": "ja-JP", + "tag": "", + "name": "あみたろ(n)", + "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_nadare/amitaro_hubert_jp-100.pth", + "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_nadare/amitaro_hubert_jp.0.index.bin", + "featureUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_nadare/amitaro_hubert_jp.0.big.npy", + "termOfUseUrl": "https://huggingface.co/wok000/vcclient_model/raw/main/rvc/amitaro_hubertjp_768_nadare/term_of_use.txt", + "credit": "あみたろ", + "description": "" + }, + { + "id": "Amitaro_t", + "lang": "ja-JP", + "tag": "", + "name": "あみたろ(t)", + "modelUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_tylor/amitaro_hubertjp_768_tylor-100.pth", + "indexUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_tylor/amitaro_hubertjp_768_tylor.0.index.bin", + "featureUrl": "https://huggingface.co/wok000/vcclient_model/resolve/main/rvc/amitaro_hubertjp_768_tylor/amitaro_hubertjp_768_tylor.0.big.npy", + "termOfUseUrl": "https://huggingface.co/wok000/vcclient_model/blob/main/rvc/amitaro_hubertjp_768_tylor/term_of_use.txt", + "credit": "あみたろ", + "description": "" } ] } diff --git a/server/voice_changer/RVC/RVC.py b/server/voice_changer/RVC/RVC.py index 684d70cf..4d3454f6 100644 --- a/server/voice_changer/RVC/RVC.py +++ b/server/voice_changer/RVC/RVC.py @@ -92,7 +92,9 @@ class RVC: def getSampleInfo(self, id: str): sampleInfos = list(filter(lambda x: x.id == id, self.settings.sampleModels)) + print("SAMPLE INFOS 1:", sampleInfos) if len(sampleInfos) > 0: + print("SAMPLE INFOS 2:", sampleInfos) return sampleInfos[0] else: None @@ -130,7 +132,7 @@ class RVC: "position": 2, } ) - + print("[Voice Changer] Downloading model files...", end="") with ThreadPoolExecutor() as pool: pool.map(download_no_tqdm, downloadParams)