Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# Python cache files
__pycache__/

# gradio files
.gradio

# folders
wandb/
*debug*
Expand Down
22 changes: 22 additions & 0 deletions run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@echo off
setlocal EnableExtensions

REM --- go to script folder ---
cd /d "%~dp0"

REM --- locate conda ---
set "CONDA_CANDIDATES=%USERPROFILE%\miniconda3;%USERPROFILE%\anaconda3;%ProgramData%\miniconda3;%ProgramData%\anaconda3"
for %%D in (%CONDA_CANDIDATES%) do (
if exist "%%~D\condabin\conda.bat" (
set "CONDA_BAT=%%~D\condabin\conda.bat"
goto :found
)
)
echo [ERROR] Couldn't find conda.bat. Edit paths above.
exit /b 1

:found
call "%CONDA_BAT%" activate latentsync || exit /b 1

REM --- run your Gradio app script ---
python gradio_app.py
46 changes: 46 additions & 0 deletions setup_env_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@echo off
setlocal EnableExtensions

REM --- stay in script folder ---
cd /d "%~dp0"

REM --- find and load conda for plain cmd.exe ---
set "CONDA_CANDIDATES=%USERPROFILE%\miniconda3;%USERPROFILE%\anaconda3;%ProgramData%\miniconda3;%ProgramData%\anaconda3"
for %%D in (%CONDA_CANDIDATES%) do (
if exist "%%~D\condabin\conda.bat" (
set "CONDA_BAT=%%~D\condabin\conda.bat"
goto :found
)
)
echo [ERROR] Couldn't find conda.bat. Install Miniconda/Anaconda or edit the paths.
goto :end

:found
call "%CONDA_BAT%" activate base || goto :fail

REM --- env ---
call conda create -y -n latentsync python=3.10.13 || goto :fail
call conda activate latentsync || goto :fail

REM --- deps ---
python -m pip install --upgrade pip || goto :fail
call conda install -y -c conda-forge ffmpeg || goto :fail
pip install -r requirements.txt || goto :fail
pip install opencv-python-headless || goto :fail

REM --- ensure huggingface cli exists ---
pip install -U huggingface_hub || goto :fail

REM --- checkpoints (edit if your repo/files differ) ---
if not exist checkpoints mkdir checkpoints
huggingface-cli download ByteDance/LatentSync-1.6 whisper/tiny.pt --local-dir checkpoints || goto :fail
huggingface-cli download ByteDance/LatentSync-1.6 latentsync_unet.pt --local-dir checkpoints || goto :fail

echo [OK] Setup complete.
goto :end

:fail
echo [FAILED] Error code %errorlevel%.

:end
pause