Support Google Colab auto cloning and setup in demo.ipynb

This commit is contained in:
Sarvesh 2026-06-09 15:38:46 +05:30
parent 7fa77b1759
commit 03c4c96dd9

View file

@ -34,6 +34,22 @@
"metadata": {},
"outputs": [],
"source": [
"# Detect if running in Google Colab\n",
"try:\n",
" import google.colab\n",
" IN_COLAB = True\n",
"except ImportError:\n",
" IN_COLAB = False\n",
"\n",
"if IN_COLAB:\n",
" print(\"Running in Google Colab. Setting up workspace repository...\")\n",
" import os\n",
" if not os.path.exists(\"/content/Video2LoRA\"):\n",
" os.system(\"git clone -b demo https://github.com/video2lora/Video2LoRA.git\")\n",
" os.chdir(\"/content/Video2LoRA\")\n",
" print(f\"Workspace directory changed to: {os.getcwd()}\")\n",
"\n",
"# Install necessary packages\n",
"!pip install torch torchvision torchaudio\n",
"!pip install transformers accelerate peft huggingface_hub decord av opencv-python matplotlib einops jaxtyping"
]