From 13a5b83cd25492cf39dcd9702627abc485cba808 Mon Sep 17 00:00:00 2001 From: Vadim Date: Sat, 14 Feb 2026 21:27:30 +0100 Subject: [PATCH] colab fix --- colab/UltraSinger.ipynb | 20 +++++++++++++++----- install/CUDA/linux_cuda_gpu.sh | 6 +++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/colab/UltraSinger.ipynb b/colab/UltraSinger.ipynb index 4466bfa..5b3aec0 100644 --- a/colab/UltraSinger.ipynb +++ b/colab/UltraSinger.ipynb @@ -25,15 +25,27 @@ "outputs": [], "source": [ "%cd /content\n", + "\n", + "# Remove existing directory if present\n", + "#!rm -rf UltraSinger\n", + "\n", + "# Clone specific branch\n", "!git clone https://github.com/rakuri255/UltraSinger.git\n", "%cd /content/UltraSinger\n", "\n", "# Install uv\n", "!curl -LsSf https://astral.sh/uv/install.sh | sh\n", - "!export PATH=\"$HOME/.local/bin:$PATH\"\n", "\n", - "# Sync dependencies with uv (GPU version with CUDA)\n", + "# Add uv to PATH and configure matplotlib\n", + "import os\n", + "os.environ['PATH'] = f\"/root/.local/bin:{os.environ['PATH']}\"\n", + "os.environ['UV_LINK_MODE'] = 'copy'\n", + "os.environ['MPLBACKEND'] = 'Agg'\n", + "\n", + "# Sync dependencies from pyproject.toml\n", "!uv sync\n", + "\n", + "# Install PyTorch with CUDA support\n", "!uv pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128 --force-reinstall\n", "\n", "%cd /content/UltraSinger/src" @@ -41,9 +53,7 @@ }, { "cell_type": "code", - "source": [ - "!python UltraSinger.py -i https://www.youtube.com/watch?v=YwNs1Z0qRY0 -o /content/output" - ], + "source": "!../.venv/bin/python UltraSinger.py -i https://www.youtube.com/watch?v=YwNs1Z0qRY0 -o /content/output\n", "metadata": { "id": "O0j4vUW0YAG2" }, diff --git a/install/CUDA/linux_cuda_gpu.sh b/install/CUDA/linux_cuda_gpu.sh index 959a495..fc71799 100644 --- a/install/CUDA/linux_cuda_gpu.sh +++ b/install/CUDA/linux_cuda_gpu.sh @@ -25,7 +25,11 @@ fi echo "uv version:" uv --version -# Sync dependencies with uv (GPU version with CUDA) +# Sync dependencies from pyproject.toml +echo "Syncing dependencies from pyproject.toml..." +uv sync + +# Install PyTorch with CUDA support (override the CPU version from pyproject.toml) echo "Installing PyTorch with CUDA support..." uv pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128 --force-reinstall