diff --git a/demo.ipynb b/demo.ipynb index b64a9ab..9aa570d 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -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" ]