From 72e9766f62d58df7a4a925c6d098ead2020436a7 Mon Sep 17 00:00:00 2001 From: Sarvesh Date: Tue, 9 Jun 2026 15:52:46 +0530 Subject: [PATCH] Fix Colab clone paths and wrap os.makedirs in try-except in Step 2 --- demo.ipynb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/demo.ipynb b/demo.ipynb index afb4b1d..442f26b 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -44,17 +44,19 @@ "if IN_COLAB:\n", " print(\"Running in Google Colab. Setting up workspace and website repositories...\")\n", " import os\n", - " # 1. Clone the main Video2LoRA repository\n", + " # 1. Clone the main Video2LoRA repository to absolute path\n", " if not os.path.exists(\"/content/Video2LoRA\"):\n", - " os.system(\"git clone -b demo https://github.com/video2lora/Video2LoRA.git\")\n", - " # 2. Clone the website repository (which hosts all qualitative video assets)\n", + " os.system(\"git clone -b demo https://github.com/video2lora/Video2LoRA.git /content/Video2LoRA\")\n", + " # 2. Clone the website repository to absolute path\n", " if not os.path.exists(\"/content/video2lora.github.io\"):\n", - " os.system(\"git clone https://github.com/video2lora/video2lora.github.io.git\")\n", + " os.system(\"git clone https://github.com/video2lora/video2lora.github.io.git /content/video2lora.github.io\")\n", " # 3. Change directory to the codebase workspace\n", " os.chdir(\"/content/Video2LoRA\")\n", - " # 4. Create a symlink to the website's media directory so video paths resolve locally\n", - " if not os.path.exists(\"media\"):\n", - " os.system(\"ln -s /content/video2lora.github.io/media media\")\n", + " # 4. Remove any existing/broken symlinks or folders to prevent conflicts\n", + " if os.path.lexists(\"media\"):\n", + " os.system(\"rm -rf media\")\n", + " # 5. Create a symlink to the website's media directory so video paths resolve locally\n", + " os.system(\"ln -s /content/video2lora.github.io/media media\")\n", " print(f\"Workspace directory changed to: {os.getcwd()}\")\n", "\n", "# Install necessary packages\n",