mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
Fix Colab clone paths and wrap os.makedirs in try-except in Step 2
This commit is contained in:
parent
327abd9e38
commit
72e9766f62
1 changed files with 9 additions and 7 deletions
16
demo.ipynb
16
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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue