Upload Instalador_HeartMula_FacilconAI.bat
Browse files
Instalador_HeartMula_FacilconAI.bat
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@echo off
|
| 2 |
+
title INSTALADOR HEARTMULA (Version Final - Sin Parentesis)
|
| 3 |
+
color 0A
|
| 4 |
+
|
| 5 |
+
echo ========================================================
|
| 6 |
+
echo INSTALADOR INTELIGENTE HEARTMULA
|
| 7 |
+
echo Recuperacion y Finalizacion de Descargas
|
| 8 |
+
echo ========================================================
|
| 9 |
+
echo.
|
| 10 |
+
|
| 11 |
+
:: --- 1. DETECCION DE PYTHON ---
|
| 12 |
+
set PYTHON_EXE=""
|
| 13 |
+
if exist "python_embeded\python.exe" (
|
| 14 |
+
set PYTHON_EXE=.\python_embeded\python.exe
|
| 15 |
+
echo [SISTEMA] Version Portable detectada.
|
| 16 |
+
) else (
|
| 17 |
+
if exist "venv\Scripts\python.exe" (
|
| 18 |
+
set PYTHON_EXE=.\venv\Scripts\python.exe
|
| 19 |
+
echo [SISTEMA] Entorno Virtual detectado.
|
| 20 |
+
) else (
|
| 21 |
+
set PYTHON_EXE=python
|
| 22 |
+
echo [SISTEMA] Usando Python del sistema.
|
| 23 |
+
)
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
:: --- 2. DETECCION DE RUTAS ---
|
| 27 |
+
:: He quitado los parentesis del texto para evitar el error
|
| 28 |
+
if exist "ComfyUI\custom_nodes" (
|
| 29 |
+
set "TARGET_NODE=ComfyUI/custom_nodes/HeartMuLa_ComfyUI"
|
| 30 |
+
set "TARGET_MODELS=ComfyUI/models/HeartMuLa"
|
| 31 |
+
echo [RUTA] Modo Portable - Instalando DENTRO de ComfyUI
|
| 32 |
+
) else (
|
| 33 |
+
set "TARGET_NODE=custom_nodes/HeartMuLa_ComfyUI"
|
| 34 |
+
set "TARGET_MODELS=models/HeartMuLa"
|
| 35 |
+
echo [RUTA] Modo Estandar
|
| 36 |
+
)
|
| 37 |
+
echo.
|
| 38 |
+
|
| 39 |
+
:: --- 3. ACTUALIZAR NODO ---
|
| 40 |
+
echo [PASO 1] Verificando Nodo...
|
| 41 |
+
if exist "%TARGET_NODE%" (
|
| 42 |
+
echo El nodo ya existe. Verificando actualizaciones...
|
| 43 |
+
pushd "%TARGET_NODE%"
|
| 44 |
+
git pull
|
| 45 |
+
popd
|
| 46 |
+
) else (
|
| 47 |
+
echo Clonando repositorio...
|
| 48 |
+
git clone https://github.com/benjiyaya/HeartMuLa_ComfyUI.git "%TARGET_NODE%"
|
| 49 |
+
)
|
| 50 |
+
echo.
|
| 51 |
+
|
| 52 |
+
:: --- 4. INSTALAR DEPENDENCIAS ---
|
| 53 |
+
echo [PASO 2] Verificando librerias...
|
| 54 |
+
"%PYTHON_EXE%" -m pip install -r "%TARGET_NODE%/requirements.txt"
|
| 55 |
+
"%PYTHON_EXE%" -m pip install huggingface_hub soundfile torchtune torchao
|
| 56 |
+
echo.
|
| 57 |
+
|
| 58 |
+
:: --- 5. GENERAR SCRIPT DE DESCARGA ---
|
| 59 |
+
echo [PASO 3] Preparando descarga de modelos...
|
| 60 |
+
|
| 61 |
+
:: Generamos el archivo Python linea por linea (Metodo seguro)
|
| 62 |
+
echo from huggingface_hub import hf_hub_download, snapshot_download > descargar_studio.py
|
| 63 |
+
echo import os >> descargar_studio.py
|
| 64 |
+
echo base = r"%TARGET_MODELS%" >> descargar_studio.py
|
| 65 |
+
echo os.makedirs(base, exist_ok=True) >> descargar_studio.py
|
| 66 |
+
echo print("--- 1. VERIFICANDO CODEC DE AUDIO ---") >> descargar_studio.py
|
| 67 |
+
echo snapshot_download(repo_id="HeartMuLa/HeartCodec-oss", local_dir=os.path.join(base, "HeartCodec-oss"), local_dir_use_symlinks=False) >> descargar_studio.py
|
| 68 |
+
echo print("--- 2. VERIFICANDO MODELO MUSICAL 3B ---") >> descargar_studio.py
|
| 69 |
+
echo snapshot_download(repo_id="HeartMuLa/HeartMuLa-oss-3B", local_dir=os.path.join(base, "HeartMuLa-oss-3B"), local_dir_use_symlinks=False) >> descargar_studio.py
|
| 70 |
+
echo print("--- 3. VERIFICANDO TRANSCRIPTOR ---") >> descargar_studio.py
|
| 71 |
+
echo snapshot_download(repo_id="HeartMuLa/HeartTranscriptor-oss", local_dir=os.path.join(base, "HeartTranscriptor-oss"), local_dir_use_symlinks=False) >> descargar_studio.py
|
| 72 |
+
echo print("--- 4. VERIFICANDO CONFIGURACION RAIZ ---") >> descargar_studio.py
|
| 73 |
+
echo hf_hub_download("unsloth/Llama-3.2-3B-Instruct", "tokenizer.json", local_dir=base, force_download=True) >> descargar_studio.py
|
| 74 |
+
echo hf_hub_download("HeartMuLa/HeartMuLa-oss-3B", "gen_config.json", local_dir=base, force_download=True) >> descargar_studio.py
|
| 75 |
+
echo print("\n[EXITO] Descargas completadas y verificadas.") >> descargar_studio.py
|
| 76 |
+
|
| 77 |
+
echo.
|
| 78 |
+
echo [PASO 4] Iniciando/Resumiendo descargas (15GB)...
|
| 79 |
+
echo Si se corta internet, vuelve a ejecutar este archivo.
|
| 80 |
+
echo ---------------------------------------------------
|
| 81 |
+
"%PYTHON_EXE%" descargar_studio.py
|
| 82 |
+
|
| 83 |
+
:: Limpieza
|
| 84 |
+
if exist descargar_studio.py del descargar_studio.py
|
| 85 |
+
|
| 86 |
+
echo.
|
| 87 |
+
echo ========================================================
|
| 88 |
+
echo PROCESO TERMINADO
|
| 89 |
+
echo ========================================================
|
| 90 |
+
pause
|