Bert-VITS2 학습하는 법 다른 일본인 글 카피닌자해서 일단 학습은 성공함
근데 추론을 webui에서 해야될텐데 코랩/캐글은 webui 막혀있고 나머지는 레포 부피가 뒈지게 커서 가상 서버에 안 들어감
그나마 sagemaker studio lab이 무료중에서는 그나마 공간 넓은데 뭐가 잘못된건지 크롬 외에서는 아예 안 불러지고 크롬에서는 WebUI화면이 하얗게 깨져서 보임...
이거 내가 예전에 sagemaker stduio lab에서 RVC 써보려고 했던 때도 이랬던 거 보면 내가 webui를 이상하게 부르고 있는 거 같은데 이건 진짜 뭐가 문제인지 모르겠다
13GB쯤 되는 걸 전부 쓰지도 않을거고 분명 추론에는 필요없는 부분이 있을텐데 그게 뭔지도 모르겠고, 애초에 webui.py에 일부 모델 불러오는 기능 있어서 줄이고 싶어도 못 줄일 거 같음
혹시 코랩 비스므리한 거 중에 공간 넉넉한 거 있나요
CPU여도 괜ㅊ낳습니다... 젭라...
sagemaker studio lab 추론 시도 코드 (Bert-VITS2 2.2기준, 이후 버전 업뎃되면 100% 오작동 예정)
!git clone https://github.com/fishaudio/Bert-VITS2.git
%cd Bert-VITS2
!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
!pip install -r requirements.txt
import os.path
from os import path
Gpth_link = 'https://huggingface.co/Purupuru188/ai_voice_models_no_permission/resolve/main/Bert-VITS2/2.2/atachi_mimi/G_3000.pth'
config_link = 'https://huggingface.co/Purupuru188/ai_voice_models_no_permission/resolve/main/Bert-VITS2/2.2/atachi_mimi/config.json'
yml_link = 'https://huggingface.co/Purupuru188/ai_voice_models_no_permission/resolve/main/Bert-VITS2/2.2/atachi_mimi/config.yml'
#각각 G_*.pth, config.json, config.yaml 링크
#링크 끝의 ?download=true 지울 것
upper_where = '/home/studio-lab-user/sagemaker-studiolab-notebooks/'
import os
os.makedirs(upper_where+'Bert-VITS2/Data', exist_ok=True)
working_dir = upper_where+'Bert-VITS2/Data'
!wget {Gpth_link} -P {upper_where}Bert-VITS2/Data/models
!wget {config_link} -P {upper_where}Bert-VITS2/Data
!wget {yml_link} -P {upper_where}Bert-VITS2
Gpth_name = Gpth_link.split('/')[-1]
import yaml
with open(upper_where+'Bert-VITS2/config.yml') as f:
config = yaml.load(f, Loader=yaml.FullLoader)
config['dataset_path'] = "Data/"
config['webui']['device'] = "cpu" # cpu나 cuda. cpu로도 아무리 늦어도 1분 내로 생성
config['webui']['model'] = "models/" + Gpth_name
config['webui']['share'] = "true"
config['webui']['port'] = 7860
config['webui']['debug'] = "false"
with open(upper_where+'Bert-VITS2/config.yml', 'w') as f:
yaml.dump(config, f)
!python webui.py
webui.py부분 로그
Downloading pytorch_model.bin: 100%|████████| 1.32G/1.32G [00:04<00:00, 327MB/s] Downloading pytorch_model.bin: 100%|████████| 1.31G/1.31G [00:03<00:00, 359MB/s] Downloading spm.model: 100%|████████████████| 2.46M/2.46M [00:00<00:00, 176MB/s] Downloading pytorch_model.bin: 100%|██████████| 874M/874M [00:02<00:00, 325MB/s] Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. | __main__ | INFO | Enable DEBUG-LEVEL log | utils | INFO | Loaded checkpoint 'Data/models/G_3000.pth' (iteration 45) 推理页面已开启! Running on local URL: http://127.0.0.1:7860 2023/12/16 14:48:22 [W] [service.go:132] login to server failed: dial tcp 44.237.78.176:7000: i/o timeout Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
이상태서 https://노트북 앞부분/studiolab/default/jupyter/proxy/7860/ 로 들어가면 하얀 화면
이건 다른 AI 음성 학습코랩 융합시킨 누더기골렘 Bert-VITS2 학습 코랩
2.2 기준이며, 버전업하면 망가질 예정
CPU만 있어서 학습은 못하는데 10몇 기가의 컴퓨터 용량을 희생해서라도 로컬 추론은 할 생각이 있으면 참고
그게 아니라 다른 곳에서 추론하는 방법을 찾으셨다면 제발 저에게 알려주세요감사합니다