|
58 | 58 | "from os.path import exists\n", |
59 | 59 | "\n", |
60 | 60 | "!git clone --quiet https://github.com/invoke-ai/InvokeAI.git # Original repo\n", |
61 | | - "%cd /content/stable-diffusion/\n", |
| 61 | + "%cd /content/InvokeAI/\n", |
62 | 62 | "!git checkout --quiet tags/release-1.14.1" |
63 | 63 | ] |
64 | 64 | }, |
|
79 | 79 | "!pip install colab-xterm\n", |
80 | 80 | "!pip install -r requirements-lin-win-colab-CUDA.txt\n", |
81 | 81 | "!pip install clean-fid torchtext\n", |
| 82 | + "!pip install transformers\n", |
82 | 83 | "gc.collect()" |
83 | 84 | ] |
84 | 85 | }, |
|
106 | 107 | "source": [ |
107 | 108 | "#@title 5. Load small ML models required\n", |
108 | 109 | "import gc\n", |
109 | | - "%cd /content/stable-diffusion/\n", |
| 110 | + "%cd /content/InvokeAI/\n", |
110 | 111 | "!python scripts/preload_models.py\n", |
111 | 112 | "gc.collect()" |
112 | 113 | ] |
|
171 | 172 | "import os \n", |
172 | 173 | "\n", |
173 | 174 | "# Folder creation if it doesn't exist\n", |
174 | | - "if exists(\"/content/stable-diffusion/models/ldm/stable-diffusion-v1\"):\n", |
| 175 | + "if exists(\"/content/InvokeAI/models/ldm/stable-diffusion-v1\"):\n", |
175 | 176 | " print(\"❗ Dir stable-diffusion-v1 already exists\")\n", |
176 | 177 | "else:\n", |
177 | | - " %mkdir /content/stable-diffusion/models/ldm/stable-diffusion-v1\n", |
| 178 | + " %mkdir /content/InvokeAI/models/ldm/stable-diffusion-v1\n", |
178 | 179 | " print(\"✅ Dir stable-diffusion-v1 created\")\n", |
179 | 180 | "\n", |
180 | 181 | "# Symbolic link if it doesn't exist\n", |
181 | | - "if exists(\"/content/stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt\"):\n", |
| 182 | + "if exists(\"/content/InvokeAI/models/ldm/stable-diffusion-v1/model.ckpt\"):\n", |
182 | 183 | " print(\"❗ Symlink already created\")\n", |
183 | 184 | "else: \n", |
184 | 185 | " src = model_path\n", |
185 | | - " dst = '/content/stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt'\n", |
| 186 | + " dst = '/content/InvokeAI/models/ldm/stable-diffusion-v1/model.ckpt'\n", |
186 | 187 | " os.symlink(src, dst) \n", |
187 | 188 | " print(\"✅ Symbolic link created successfully\")" |
188 | 189 | ] |
|
233 | 234 | "%matplotlib inline\n", |
234 | 235 | "\n", |
235 | 236 | "images = []\n", |
236 | | - "for img_path in sorted(glob.glob('/content/stable-diffusion/outputs/img-samples/*.png'), reverse=True):\n", |
| 237 | + "for img_path in sorted(glob.glob('/content/InvokeAI/outputs/img-samples/*.png'), reverse=True):\n", |
237 | 238 | " images.append(mpimg.imread(img_path))\n", |
238 | 239 | "\n", |
239 | 240 | "images = images[:15] \n", |
|
0 commit comments