Spaces:
Runtime error
Runtime error
Update finetune_xtts_hf.py
Browse files- finetune_xtts_hf.py +14 -3
finetune_xtts_hf.py
CHANGED
|
@@ -9,11 +9,22 @@ DATASET_PATH = "/home/user/app/dataset" # Ruta a tu dataset
|
|
| 9 |
OUTPUT_PATH = "/tmp/output_model"
|
| 10 |
BASE_MODEL = "coqui/XTTS-v2"
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# === 1. Descargar modelo base de HF ===
|
| 13 |
print("=== Descargando modelo base desde Hugging Face ===")
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
CONFIG_PATH = "./xtts_model/config.json"
|
| 19 |
RESTORE_PATH = "./xtts_model/model.pth"
|
|
|
|
| 9 |
OUTPUT_PATH = "/tmp/output_model"
|
| 10 |
BASE_MODEL = "coqui/XTTS-v2"
|
| 11 |
|
| 12 |
+
os.makedirs("./xtts_model", exist_ok=True)
|
| 13 |
+
os.makedirs("./output", exist_ok=True)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
# === 1. Descargar modelo base de HF ===
|
| 17 |
print("=== Descargando modelo base desde Hugging Face ===")
|
| 18 |
+
from huggingface_hub import snapshot_download
|
| 19 |
+
|
| 20 |
+
print("=== Descargando modelo base desde Hugging Face ===")
|
| 21 |
+
snapshot_download(
|
| 22 |
+
repo_id="coqui/XTTS-v2",
|
| 23 |
+
local_dir="./xtts_model",
|
| 24 |
+
local_dir_use_symlinks=False,
|
| 25 |
+
revision="main" # aseguras que baje la 煤ltima versi贸n estable
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
|
| 29 |
CONFIG_PATH = "./xtts_model/config.json"
|
| 30 |
RESTORE_PATH = "./xtts_model/model.pth"
|