mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-26 17:11:02 +02:00
Support Google Colab auto cloning and setup in demo.ipynb
This commit is contained in:
parent
7fa77b1759
commit
03c4c96dd9
1 changed files with 16 additions and 0 deletions
16
demo.ipynb
16
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"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue