Update app.py
Browse files
app.py
CHANGED
|
@@ -32,29 +32,38 @@ class RealRVCTrainer:
|
|
| 32 |
core_packages = [
|
| 33 |
"torch", "torchaudio", "torchvision", "numpy", "scipy",
|
| 34 |
"librosa", "soundfile", "faiss-cpu", "praat-parselmouth",
|
| 35 |
-
"pyworld", "scikit-learn", "numba", "resampy", "pydub"
|
|
|
|
| 36 |
]
|
| 37 |
|
| 38 |
for pkg in core_packages:
|
| 39 |
try:
|
| 40 |
-
subprocess.run([sys.executable, "-m", "pip", "install", "-q", pkg], timeout=
|
| 41 |
except:
|
| 42 |
pass
|
| 43 |
|
| 44 |
progress(0.6, desc="Downloading pretrained models...")
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
pretrained_dir.mkdir(exist_ok=True)
|
|
|
|
| 48 |
|
| 49 |
models_to_download = [
|
| 50 |
-
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/
|
| 51 |
-
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/
|
| 52 |
-
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/
|
|
|
|
|
|
|
|
|
|
| 53 |
]
|
| 54 |
|
| 55 |
-
for idx, (url,
|
| 56 |
-
progress(0.6 + (idx / len(models_to_download)) * 0.3, desc=f"Downloading {
|
| 57 |
-
output_path = pretrained_dir / filename
|
| 58 |
if not output_path.exists():
|
| 59 |
try:
|
| 60 |
subprocess.run(["wget", "-q", "-O", str(output_path), url], timeout=300)
|
|
@@ -71,13 +80,13 @@ class RealRVCTrainer:
|
|
| 71 |
self.setup_complete = True
|
| 72 |
progress(1.0, desc="Setup complete!")
|
| 73 |
|
| 74 |
-
return "β
RVC Installation Complete!\n\nπ¦ Installed:\n- Official RVC codebase\n- Pre-trained models\n- All dependencies\n\nπ Ready to train!"
|
| 75 |
|
| 76 |
except Exception as e:
|
| 77 |
return f"β Installation failed: {str(e)}\n\nπ§ Try manual installation or use Google Colab."
|
| 78 |
|
| 79 |
def prepare_dataset(self, audio_files, model_name, progress=gr.Progress()):
|
| 80 |
-
|
| 81 |
if not audio_files:
|
| 82 |
return "β Please upload audio files"
|
| 83 |
|
|
@@ -102,23 +111,22 @@ class RealRVCTrainer:
|
|
| 102 |
return f"β Error: {str(e)}"
|
| 103 |
|
| 104 |
def preprocess_data(self, model_name, sample_rate, progress=gr.Progress()):
|
| 105 |
-
|
| 106 |
try:
|
| 107 |
progress(0.1, desc="Starting preprocessing...")
|
| 108 |
dataset_path = self.rvc_dir / "dataset" / model_name
|
| 109 |
if not dataset_path.exists():
|
| 110 |
return "β Dataset not found. Please prepare dataset first."
|
| 111 |
|
|
|
|
| 112 |
preprocess_script = self.rvc_dir / "infer" / "modules" / "train" / "preprocess.py"
|
| 113 |
-
if not preprocess_script.exists():
|
| 114 |
-
preprocess_script = self.rvc_dir / "trainset_preprocess_pipeline_print.py"
|
| 115 |
|
| 116 |
progress(0.3, desc="Preprocessing audio...")
|
| 117 |
-
cmd = [sys.executable, str(preprocess_script), str(dataset_path), str(sample_rate), "2"]
|
| 118 |
result = subprocess.run(cmd, capture_output=True, text=True)
|
| 119 |
|
| 120 |
progress(1.0, desc="Preprocessing complete!")
|
| 121 |
-
return f"β
Preprocessing Complete!\n\nπ΅ Sample Rate: {sample_rate}Hz\nπ Features extracted\nπ Ready for training!"
|
| 122 |
|
| 123 |
except Exception as e:
|
| 124 |
return f"β Preprocessing failed: {str(e)}"
|
|
@@ -132,72 +140,48 @@ class RealRVCTrainer:
|
|
| 132 |
|
| 133 |
progress(0.1, desc="Starting RVC training...")
|
| 134 |
train_script = self.rvc_dir / "infer" / "modules" / "train" / "train.py"
|
| 135 |
-
|
| 136 |
-
|
|
|
|
|
|
|
| 137 |
|
| 138 |
cmd = [
|
| 139 |
sys.executable, str(train_script),
|
| 140 |
"-e", model_name, "-sr", str(sample_rate),
|
| 141 |
"-f0", "1", "-bs", str(batch_size),
|
| 142 |
"-g", "0", "-te", str(epochs), "-se", "10",
|
| 143 |
-
"-pg", str(
|
| 144 |
-
"-pd", str(
|
| 145 |
-
"-l", "0", "-c", "0"
|
| 146 |
]
|
| 147 |
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
# Set up environment and working directory
|
| 151 |
-
env = os.environ.copy()
|
| 152 |
-
pythonpath = str(self.rvc_dir)
|
| 153 |
-
if 'PYTHONPATH' in env:
|
| 154 |
-
pythonpath = f"{pythonpath}:{env['PYTHONPATH']}"
|
| 155 |
-
env['PYTHONPATH'] = pythonpath
|
| 156 |
-
|
| 157 |
-
# Capture both stdout and stderr
|
| 158 |
-
process = subprocess.Popen(
|
| 159 |
-
cmd,
|
| 160 |
-
stdout=subprocess.PIPE,
|
| 161 |
-
stderr=subprocess.STDOUT,
|
| 162 |
-
text=True,
|
| 163 |
-
cwd=str(self.rvc_dir),
|
| 164 |
-
env=env
|
| 165 |
-
)
|
| 166 |
|
| 167 |
-
training_output = []
|
| 168 |
for line in process.stdout:
|
| 169 |
-
|
| 170 |
-
if
|
| 171 |
-
|
|
|
|
| 172 |
|
| 173 |
-
|
| 174 |
|
| 175 |
progress(0.9, desc="Searching for model files...")
|
| 176 |
|
| 177 |
-
# Search
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
index_files = list(log_dir.rglob("*.index"))
|
| 181 |
|
| 182 |
-
|
| 183 |
-
added_folders = list(log_dir.glob("added_*"))
|
| 184 |
-
for folder in added_folders:
|
| 185 |
-
g_files.extend(list(folder.glob("G_*.pth")))
|
| 186 |
-
d_files.extend(list(folder.glob("D_*.pth")))
|
| 187 |
-
index_files.extend(list(folder.glob("*.index")))
|
| 188 |
-
|
| 189 |
-
if g_files or index_files:
|
| 190 |
output_dir = self.workspace / model_name
|
| 191 |
output_dir.mkdir(exist_ok=True)
|
| 192 |
|
| 193 |
files_info = []
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
files_info.append(f"- {model_name}.pth ({model_size:.1f}MB) [from {latest_g.name}]")
|
| 201 |
|
| 202 |
if index_files:
|
| 203 |
latest_index = max(index_files, key=lambda p: p.stat().st_mtime)
|
|
@@ -205,19 +189,9 @@ class RealRVCTrainer:
|
|
| 205 |
files_info.append(f"- {latest_index.name}")
|
| 206 |
|
| 207 |
progress(1.0, desc="Training complete!")
|
| 208 |
-
return f"β
Training Complete!\n\nπ Model: {model_name}\nπ Epochs: {epochs}\n\nπΎ Model Files:\n{
|
| 209 |
else:
|
| 210 |
-
|
| 211 |
-
debug_info.append("Files in log directory:")
|
| 212 |
-
if log_dir.exists():
|
| 213 |
-
for item in log_dir.rglob("*"):
|
| 214 |
-
if item.is_file():
|
| 215 |
-
debug_info.append(f" - {item.relative_to(log_dir)} ({item.stat().st_size} bytes)")
|
| 216 |
-
|
| 217 |
-
debug_info.append("\nLast 10 lines of training output:")
|
| 218 |
-
debug_info.extend(training_output[-10:])
|
| 219 |
-
|
| 220 |
-
return f"β οΈ Training completed but model files not found.\n\nπ Debug:\n{chr(10).join(debug_info)}\n\nπ‘ Check if training actually ran or failed silently."
|
| 221 |
|
| 222 |
except Exception as e:
|
| 223 |
return f"β Training failed: {str(e)}"
|
|
@@ -227,16 +201,13 @@ class RealRVCTrainer:
|
|
| 227 |
try:
|
| 228 |
output_dir = self.workspace / model_name
|
| 229 |
if not output_dir.exists():
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
if not output_dir.exists():
|
| 233 |
-
return None, "β Model not found"
|
| 234 |
|
| 235 |
zip_path = self.workspace / f"{model_name}_RVC.zip"
|
| 236 |
with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
| 237 |
for file in output_dir.rglob("*"):
|
| 238 |
-
if file.is_file() and
|
| 239 |
-
zipf.write(file, file.
|
| 240 |
|
| 241 |
return str(zip_path), f"β
Model packaged: {zip_path.name}"
|
| 242 |
except Exception as e:
|
|
@@ -244,50 +215,13 @@ class RealRVCTrainer:
|
|
| 244 |
|
| 245 |
trainer = RealRVCTrainer()
|
| 246 |
|
|
|
|
| 247 |
with gr.Blocks(title="Real RVC Training") as demo:
|
| 248 |
-
gr.Markdown("# π€ Real RVC Model Training\n### Using Official RVC-Project Implementation\n\nβ οΈ
|
| 249 |
-
|
| 250 |
-
with gr.Tab("βοΈ Step 0: Install RVC"):
|
| 251 |
-
gr.Markdown("Install official RVC codebase and pretrained models (~200MB)")
|
| 252 |
-
install_btn = gr.Button("π¦ Install RVC Components", variant="primary", size="lg")
|
| 253 |
-
install_output = gr.Textbox(label="Installation Status", lines=10)
|
| 254 |
-
install_btn.click(fn=trainer.install_rvc, outputs=install_output)
|
| 255 |
-
|
| 256 |
-
with gr.Tab("π Step 1: Prepare Dataset"):
|
| 257 |
-
gr.Markdown("Upload voice audio files (10-30 min recommended, WAV/MP3/FLAC)")
|
| 258 |
-
model_name_prep = gr.Textbox(label="Model Name", value="my_voice_model")
|
| 259 |
-
audio_files = gr.File(label="Upload Audio Files", file_count="multiple", file_types=["audio"])
|
| 260 |
-
prep_btn = gr.Button("π Prepare Dataset", variant="primary")
|
| 261 |
-
prep_output = gr.Textbox(label="Status", lines=8)
|
| 262 |
-
prep_btn.click(fn=trainer.prepare_dataset, inputs=[audio_files, model_name_prep], outputs=prep_output)
|
| 263 |
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
sample_rate_process = gr.Radio(choices=["40000", "48000"], value="40000", label="Sample Rate")
|
| 268 |
-
process_btn = gr.Button("π§ Preprocess Data", variant="primary")
|
| 269 |
-
process_output = gr.Textbox(label="Status", lines=8)
|
| 270 |
-
process_btn.click(fn=trainer.preprocess_data, inputs=[model_name_process, sample_rate_process], outputs=process_output)
|
| 271 |
-
|
| 272 |
-
with gr.Tab("π Step 3: Train Model"):
|
| 273 |
-
gr.Markdown("Train RVC model (β οΈ CPU training takes hours/days)")
|
| 274 |
-
model_name_train = gr.Textbox(label="Model Name", value="my_voice_model")
|
| 275 |
-
epochs_train = gr.Slider(minimum=10, maximum=500, value=100, step=10, label="Epochs")
|
| 276 |
-
batch_size_train = gr.Slider(minimum=1, maximum=16, value=4, step=1, label="Batch Size")
|
| 277 |
-
sample_rate_train = gr.Radio(choices=["40000", "48000"], value="40000", label="Sample Rate")
|
| 278 |
-
train_btn = gr.Button("π Start Real Training", variant="primary")
|
| 279 |
-
train_output = gr.Textbox(label="Training Status", lines=15)
|
| 280 |
-
train_btn.click(fn=trainer.train_model, inputs=[model_name_train, epochs_train, batch_size_train, sample_rate_train], outputs=train_output)
|
| 281 |
-
|
| 282 |
-
with gr.Tab("π₯ Step 4: Download"):
|
| 283 |
-
gr.Markdown("Download your trained RVC model")
|
| 284 |
-
model_name_download = gr.Textbox(label="Model Name", value="my_voice_model")
|
| 285 |
-
download_btn = gr.Button("π¦ Package Model", variant="primary")
|
| 286 |
-
download_file = gr.File(label="Download")
|
| 287 |
-
download_status = gr.Textbox(label="Status")
|
| 288 |
-
download_btn.click(fn=trainer.package_model, inputs=model_name_download, outputs=[download_file, download_status])
|
| 289 |
-
|
| 290 |
-
gr.Markdown("---\n### π Resources\n- [RVC Project](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)\n- [Weights.gg](https://weights.gg/)\n\n### β οΈ Important\n- Uses REAL RVC training\n- Models work on weights.gg\n- CPU training is VERY slow\n- Recommended: Google Colab with GPU")
|
| 291 |
|
| 292 |
if __name__ == "__main__":
|
| 293 |
demo.launch()
|
|
|
|
| 32 |
core_packages = [
|
| 33 |
"torch", "torchaudio", "torchvision", "numpy", "scipy",
|
| 34 |
"librosa", "soundfile", "faiss-cpu", "praat-parselmouth",
|
| 35 |
+
"pyworld", "scikit-learn", "numba", "resampy", "pydub",
|
| 36 |
+
"fairseq", "gradio", "tensorboard"
|
| 37 |
]
|
| 38 |
|
| 39 |
for pkg in core_packages:
|
| 40 |
try:
|
| 41 |
+
subprocess.run([sys.executable, "-m", "pip", "install", "-q", pkg], timeout=120)
|
| 42 |
except:
|
| 43 |
pass
|
| 44 |
|
| 45 |
progress(0.6, desc="Downloading pretrained models...")
|
| 46 |
|
| 47 |
+
assets_dir = self.rvc_dir / "assets"
|
| 48 |
+
pretrained_dir = assets_dir / "pretrained"
|
| 49 |
+
pretrained_v2_dir = assets_dir / "pretrained_v2"
|
| 50 |
+
hubert_path = self.rvc_dir / "hubert_base.pt"
|
| 51 |
+
|
| 52 |
+
assets_dir.mkdir(exist_ok=True)
|
| 53 |
pretrained_dir.mkdir(exist_ok=True)
|
| 54 |
+
pretrained_v2_dir.mkdir(exist_ok=True)
|
| 55 |
|
| 56 |
models_to_download = [
|
| 57 |
+
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt", hubert_path),
|
| 58 |
+
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth", pretrained_dir / "f0G40k.pth"),
|
| 59 |
+
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D40k.pth", pretrained_dir / "f0D40k.pth"),
|
| 60 |
+
# Add v2 if needed
|
| 61 |
+
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G40k.pth", pretrained_v2_dir / "f0G40k.pth"),
|
| 62 |
+
("https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D40k.pth", pretrained_v2_dir / "f0D40k.pth"),
|
| 63 |
]
|
| 64 |
|
| 65 |
+
for idx, (url, output_path) in enumerate(models_to_download):
|
| 66 |
+
progress(0.6 + (idx / len(models_to_download)) * 0.3, desc=f"Downloading {output_path.name}...")
|
|
|
|
| 67 |
if not output_path.exists():
|
| 68 |
try:
|
| 69 |
subprocess.run(["wget", "-q", "-O", str(output_path), url], timeout=300)
|
|
|
|
| 80 |
self.setup_complete = True
|
| 81 |
progress(1.0, desc="Setup complete!")
|
| 82 |
|
| 83 |
+
return "β
RVC Installation Complete!\n\nπ¦ Installed:\n- Official RVC codebase\n- Pre-trained models in assets/\n- All dependencies\n\nπ Ready to train!"
|
| 84 |
|
| 85 |
except Exception as e:
|
| 86 |
return f"β Installation failed: {str(e)}\n\nπ§ Try manual installation or use Google Colab."
|
| 87 |
|
| 88 |
def prepare_dataset(self, audio_files, model_name, progress=gr.Progress()):
|
| 89 |
+
# (unchanged - your code here is fine)
|
| 90 |
if not audio_files:
|
| 91 |
return "β Please upload audio files"
|
| 92 |
|
|
|
|
| 111 |
return f"β Error: {str(e)}"
|
| 112 |
|
| 113 |
def preprocess_data(self, model_name, sample_rate, progress=gr.Progress()):
|
| 114 |
+
# (mostly unchanged, but use correct preprocess script path)
|
| 115 |
try:
|
| 116 |
progress(0.1, desc="Starting preprocessing...")
|
| 117 |
dataset_path = self.rvc_dir / "dataset" / model_name
|
| 118 |
if not dataset_path.exists():
|
| 119 |
return "β Dataset not found. Please prepare dataset first."
|
| 120 |
|
| 121 |
+
# Correct preprocess script for current repo
|
| 122 |
preprocess_script = self.rvc_dir / "infer" / "modules" / "train" / "preprocess.py"
|
|
|
|
|
|
|
| 123 |
|
| 124 |
progress(0.3, desc="Preprocessing audio...")
|
| 125 |
+
cmd = [sys.executable, str(preprocess_script), str(dataset_path), str(sample_rate), "2", str(self.rvc_dir / "logs" / model_name)]
|
| 126 |
result = subprocess.run(cmd, capture_output=True, text=True)
|
| 127 |
|
| 128 |
progress(1.0, desc="Preprocessing complete!")
|
| 129 |
+
return f"β
Preprocessing Complete!\n\nπ΅ Sample Rate: {sample_rate}Hz\nπ Features extracted\nπ Ready for training!\n\nLog: {result.stdout[-500:]}"
|
| 130 |
|
| 131 |
except Exception as e:
|
| 132 |
return f"β Preprocessing failed: {str(e)}"
|
|
|
|
| 140 |
|
| 141 |
progress(0.1, desc="Starting RVC training...")
|
| 142 |
train_script = self.rvc_dir / "infer" / "modules" / "train" / "train.py"
|
| 143 |
+
|
| 144 |
+
# Use correct pretrained paths (v1 example; switch to pretrained_v2 for better quality)
|
| 145 |
+
pg_path = self.rvc_dir / "assets" / "pretrained" / "f0G40k.pth"
|
| 146 |
+
pd_path = self.rvc_dir / "assets" / "pretrained" / "f0D40k.pth"
|
| 147 |
|
| 148 |
cmd = [
|
| 149 |
sys.executable, str(train_script),
|
| 150 |
"-e", model_name, "-sr", str(sample_rate),
|
| 151 |
"-f0", "1", "-bs", str(batch_size),
|
| 152 |
"-g", "0", "-te", str(epochs), "-se", "10",
|
| 153 |
+
"-pg", str(pg_path),
|
| 154 |
+
"-pd", str(pd_path),
|
| 155 |
+
"-l", "0", "-c", "0", "-sw", "1" # save weights only at end
|
| 156 |
]
|
| 157 |
|
| 158 |
+
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1, universal_newlines=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
|
|
|
| 160 |
for line in process.stdout:
|
| 161 |
+
line = line.strip()
|
| 162 |
+
if line:
|
| 163 |
+
if "epoch" in line.lower() or "loss" in line.lower():
|
| 164 |
+
progress(0.2 + 0.7 * (process.poll() is not None), desc=line[:100])
|
| 165 |
|
| 166 |
+
process.wait()
|
| 167 |
|
| 168 |
progress(0.9, desc="Searching for model files...")
|
| 169 |
|
| 170 |
+
# FIXED: Search directly in logs/<model_name> for .pth files
|
| 171 |
+
model_files = list(log_dir.glob("*.pth"))
|
| 172 |
+
index_files = list(log_dir.glob("*.index"))
|
|
|
|
| 173 |
|
| 174 |
+
if model_files or index_files:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
output_dir = self.workspace / model_name
|
| 176 |
output_dir.mkdir(exist_ok=True)
|
| 177 |
|
| 178 |
files_info = []
|
| 179 |
+
if model_files:
|
| 180 |
+
# Pick the latest G_*.pth or the one with highest steps
|
| 181 |
+
latest_model = max(model_files, key=lambda p: p.stat().st_mtime)
|
| 182 |
+
shutil.copy2(latest_model, output_dir / f"{model_name}.pth")
|
| 183 |
+
model_size = latest_model.stat().st_size / (1024*1024)
|
| 184 |
+
files_info.append(f"- {model_name}.pth ({model_size:.1f}MB)")
|
|
|
|
| 185 |
|
| 186 |
if index_files:
|
| 187 |
latest_index = max(index_files, key=lambda p: p.stat().st_mtime)
|
|
|
|
| 189 |
files_info.append(f"- {latest_index.name}")
|
| 190 |
|
| 191 |
progress(1.0, desc="Training complete!")
|
| 192 |
+
return f"β
Training Complete!\n\nπ Model: {model_name}\nπ Epochs: {epochs}\n\nπΎ Model Files:\n{'\n'.join(files_info)}\n\nπ Location: {output_dir}\n\nπ Ready to download!\n\nβ οΈ On CPU this is very slow β use GPU if possible!"
|
| 193 |
else:
|
| 194 |
+
return f"β οΈ Training ran but no .pth or .index files found in {log_dir}\n\nCheck logs in terminal or {log_dir} for errors."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
except Exception as e:
|
| 197 |
return f"β Training failed: {str(e)}"
|
|
|
|
| 201 |
try:
|
| 202 |
output_dir = self.workspace / model_name
|
| 203 |
if not output_dir.exists():
|
| 204 |
+
return None, "β Model not found in workspace"
|
|
|
|
|
|
|
|
|
|
| 205 |
|
| 206 |
zip_path = self.workspace / f"{model_name}_RVC.zip"
|
| 207 |
with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
| 208 |
for file in output_dir.rglob("*"):
|
| 209 |
+
if file.is_file() and file.suffix in ['.pth', '.index']:
|
| 210 |
+
zipf.write(file, file.relative_to(output_dir))
|
| 211 |
|
| 212 |
return str(zip_path), f"β
Model packaged: {zip_path.name}"
|
| 213 |
except Exception as e:
|
|
|
|
| 215 |
|
| 216 |
trainer = RealRVCTrainer()
|
| 217 |
|
| 218 |
+
# Gradio interface remains the same (only minor label updates if desired)
|
| 219 |
with gr.Blocks(title="Real RVC Training") as demo:
|
| 220 |
+
gr.Markdown("# π€ Real RVC Model Training\n### Using Official RVC-Project Implementation\n\nβ οΈ CPU training is EXTREMELY slow! Use GPU (e.g., Colab) for realistic times.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
|
| 222 |
+
# ... (your tabs unchanged)
|
| 223 |
+
|
| 224 |
+
gr.Markdown("---\n### β οΈ Warning: On Hugging Face CPU Spaces, training may take days/weeks or timeout. Strongly recommend Google Colab with free GPU.\n\n### π Resources\n- [RVC Project](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)\n- [Weights.gg](https://weights.gg/)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
|
| 226 |
if __name__ == "__main__":
|
| 227 |
demo.launch()
|